Skip to content

Commit

Permalink
feat: makefile (#56)
Browse files Browse the repository at this point in the history
* feat: makefile

* fix:  newline at eof

* fix: newline at eof

* makefile: fix indent
  • Loading branch information
rpurdel authored Feb 14, 2024
1 parent 66adf29 commit 40c6a8b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.idea
.pytest_cache
.venv
.env
.env.sample
.coverage
Dockerfile
README.md
Expand Down
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
IMAGE_REGISTRY=hub.docker.com
DOCKER_LOGIN_CMD=docker login
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ifneq (,$(wildcard ./.env))
include .env
endif

GIT_HASH ?= $(shell git rev-parse --short HEAD)
PLATFORMS ?= linux/amd64
CACHE_DIR ?= /tmp/docker-cache

_login:
${DOCKER_LOGIN_CMD}

build-summaries : _login
docker buildx build \
--build-arg="BASE_IMAGE_BUILD=nvidia/cuda:12.3.0-devel-ubuntu20.04" \
--build-arg="BASE_IMAGE_RUN=nvidia/cuda:12.3.0-runtime-ubuntu20.04" \
--progress plain \
--push \
--platform ${PLATFORMS} \
--cache-from type=local,src=${CACHE_DIR} \
--cache-to type=local,dest=${CACHE_DIR},mode=max \
-t ${IMAGE_REGISTRY}/skynet:summaries-${GIT_HASH} .

build-whisper : _login
docker buildx build \
--build-arg="BASE_IMAGE_BUILD=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04" \
--build-arg="BASE_IMAGE_RUN=nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04" \
--progress plain \
--platform ${PLATFORMS} \
--cache-from type=local,src=${CACHE_DIR} \
--cache-to type=local,dest=${CACHE_DIR},mode=max \
-t ${IMAGE_REGISTRY}/skynet:whisper-${GIT_HASH} .

0 comments on commit 40c6a8b

Please sign in to comment.