pull/3451/head
sungjoonkim 2025-10-24 23:05:40 +09:00
parent 4c17076347
commit aabc199d2b
3 changed files with 51 additions and 2 deletions

View File

@ -45,5 +45,3 @@ ENV OUTPUT_DIR=/workspace/output_model
# 볼륨 마운트 포인트
VOLUME ["/workspace/dataset", "/workspace/output_model"]
ENTRYPOINT ["/entrypoint.sh"]

3
docker-build.cmd Normal file
View File

@ -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

48
docker-compose.yml Normal file
View File

@ -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"]