diff --git a/Dockerfile b/Dockerfile index 1bd5fa6..cfe4cab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,5 +45,3 @@ ENV OUTPUT_DIR=/workspace/output_model # 볼륨 마운트 포인트 VOLUME ["/workspace/dataset", "/workspace/output_model"] - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker-build.cmd b/docker-build.cmd new file mode 100644 index 0000000..f90d83c --- /dev/null +++ b/docker-build.cmd @@ -0,0 +1,3 @@ +docker build --no-cache -t aicompanion/sxdl_train_captioner:0.0.5 . + +docker tag aicompanion/sxdl_train_captioner:0.0.5 aicompanion/sxdl_train_captioner:latest \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..82d2228 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,48 @@ +services: + sxdl_train_captioner: + build: + context: . + dockerfile: Dockerfile + image: aicompanion/sxdl_train_captioner:latest + container_name: sxdl_train_captioner + + # GPU 설정 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + + ports: + - "7860:7860" + + # 볼륨 마운트 (호스트 ↔ 컨테이너) + volumes: + - ./models:/workspace/sxdl_train_captioner/dataset + - ./outputs:/workspace/sxdl_train_captioner/output_model + + environment: + # GPU 선택 (필요 시 GPU ID 지정) + # - CUDA_VISIBLE_DEVICES=1 + - HF_HOME=/workspace/sxdl_train_captioner/models + - HF_HUB_CACHE=/workspace/sxdl_train_captioner/models + - PYTHONUNBUFFERED=1 + - TZ=Asia/Seoul + - OMP_NUM_THREADS=8 + - MKL_NUM_THREADS=8 + - TMPDIR=/dev/shm + + stdin_open: true + tty: true + restart: unless-stopped + shm_size: "16gb" + + working_dir: /workspace/sxdl_train_captioner + + # GPU 자동 탐색, 기본 0번 GPU +# command: ["python", "run-gradio.py"] + + # 여러개 GPU가 있는 경우 특정 GPU 번호를 지정하거나 gradio live를 사용하려는 경우 + # command: ["python", "run-gradio.py", " --device 3", "--share"] \ No newline at end of file