Skip to content

Commit 16a2981

Browse files
committed
Add Docker build and run commands to Makefile
1 parent 05f95ec commit 16a2981

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,33 @@ export streamlit_app=True
22
app:
33

44
streamlit run amadeusgpt/app.py --server.fileWatcherType none --server.maxUploadSize 1000
5+
6+
7+
IMG_TAG := 0.1
8+
IMG_NAME := amadeusgpt
9+
DOCKERFILE := Dockerfile
10+
11+
BUILD_ARGS := \
12+
--build-arg uid=$(shell id -u) \
13+
--build-arg gid=$(shell id -g) \
14+
--build-arg user_name=$(shell id -un)
15+
build:
16+
docker build $(BUILD_ARGS) \
17+
-t $(IMG_NAME):$(IMG_TAG) -f $(DOCKERFILE) .
18+
19+
# [USER: ADJUST VOLUMES]
20+
# path to the local project
21+
HOST_SRC := /home/$(shell id -un)/AmadeusGPT
22+
# path to the project in the container
23+
DOCKER_SRC := /home/$(shell id -un)/AmadeusGPT
24+
# DOCKER_DATA := /mnt
25+
VOLUMES := \
26+
--volume $(HOST_SRC):$(DOCKER_SRC)
27+
28+
CONTAINER_TAG :=_test_v0.1
29+
CONTAINER_NAME := amadeusgpt_$(CONTAINER_TAG) # $(GPU)
30+
31+
run:
32+
docker run --shm-size=60G --gpus all -it --name $(CONTAINER_NAME) \
33+
$(VOLUMES) \
34+
$(IMG_NAME):$(IMG_TAG) tail -f /dev/null

0 commit comments

Comments
 (0)