seungminkwak commited on
Commit
3f609a0
ยท
1 Parent(s): 08b23ce

final: stable Dockerfile (cd /app, cu118 torch, preflight import)

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -9
Dockerfile CHANGED
@@ -19,19 +19,20 @@ RUN apt-get update && apt-get install -y \
19
  # ------------------------------------------------------------
20
  ENV PIP_NO_CACHE_DIR=1 \
21
  PYTHONUNBUFFERED=1 \
22
- # OMP ๊ฒฝ๊ณ  ์ œ๊ฑฐ ๋ฐ ๋‹จ์ผ ์Šค๋ ˆ๋“œ ๊ณ ์ • (libgomp ์—๋Ÿฌ ํšŒํ”ผ)
23
  OMP_NUM_THREADS=1 \
24
  MKL_THREADING_LAYER=SEQUENTIAL \
25
- # ์ž…์ถœ๋ ฅ ๊ฒฝ๋กœ
26
  TMP_IN_DIR=/data/in \
27
  RESULT_DIR=/data/results
28
 
 
 
 
29
  RUN python -m pip install --upgrade pip
30
 
31
  # ------------------------------------------------------------
32
- # Build Cache Busting (optional, force rebuild)
33
  # ------------------------------------------------------------
34
- ARG CACHE_BUST=2025-11-05-01-30
35
 
36
  # ------------------------------------------------------------
37
  # Work Directory
@@ -62,10 +63,10 @@ COPY app.py /app/app.py
62
  COPY third_party/Puppeteer /app/Puppeteer
63
  RUN chmod +x /app/Puppeteer/demo_rigging.sh || true
64
 
65
- # PYTHONPATH: app / Puppeteer / third_party
 
 
66
  ENV PYTHONPATH=/app:/app/Puppeteer:/app/Puppeteer/third_party:$PYTHONPATH
67
-
68
- # ์ผ๋ถ€ ์ฝ”๋“œ๊ฐ€ 'third_partys' ๋ฅผ import ํ•˜๋Š” ๊ฒฝ์šฐ ๋Œ€๋น„
69
  RUN ln -s /app/Puppeteer/third_party /app/third_partys || true \
70
  && touch /app/Puppeteer/third_party/__init__.py
71
 
@@ -75,11 +76,15 @@ RUN ln -s /app/Puppeteer/third_party /app/third_partys || true \
75
  RUN mkdir -p /data/in /data/results && chmod -R 777 /data
76
 
77
  # ------------------------------------------------------------
78
- # ------------------------------------------------------------
79
- # Entrypoint (cd /app ๋ณด์žฅ)
80
  # ------------------------------------------------------------
81
  RUN printf '#!/bin/bash\nset -euo pipefail\ncd /app\npython -c "import importlib, sys; import app; print(\\"[boot] app imported OK\\")" || exit 1\nuvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}\n' > /app/run.sh \
82
  && chmod +x /app/run.sh
83
 
84
  EXPOSE 7860
85
  CMD ["sh", "-c", "/app/run.sh"]
 
 
 
 
 
 
19
  # ------------------------------------------------------------
20
  ENV PIP_NO_CACHE_DIR=1 \
21
  PYTHONUNBUFFERED=1 \
 
22
  OMP_NUM_THREADS=1 \
23
  MKL_THREADING_LAYER=SEQUENTIAL \
 
24
  TMP_IN_DIR=/data/in \
25
  RESULT_DIR=/data/results
26
 
27
+ # ------------------------------------------------------------
28
+ # Upgrade pip
29
+ # ------------------------------------------------------------
30
  RUN python -m pip install --upgrade pip
31
 
32
  # ------------------------------------------------------------
33
+ # Build Cache Busting (force rebuild)
34
  # ------------------------------------------------------------
35
+ ARG CACHE_BUST=2025-11-05-03-30
36
 
37
  # ------------------------------------------------------------
38
  # Work Directory
 
63
  COPY third_party/Puppeteer /app/Puppeteer
64
  RUN chmod +x /app/Puppeteer/demo_rigging.sh || true
65
 
66
+ # ------------------------------------------------------------
67
+ # Python Path / third_partys Compatibility
68
+ # ------------------------------------------------------------
69
  ENV PYTHONPATH=/app:/app/Puppeteer:/app/Puppeteer/third_party:$PYTHONPATH
 
 
70
  RUN ln -s /app/Puppeteer/third_party /app/third_partys || true \
71
  && touch /app/Puppeteer/third_party/__init__.py
72
 
 
76
  RUN mkdir -p /data/in /data/results && chmod -R 777 /data
77
 
78
  # ------------------------------------------------------------
79
+ # Entrypoint (cd /app + preflight import)
 
80
  # ------------------------------------------------------------
81
  RUN printf '#!/bin/bash\nset -euo pipefail\ncd /app\npython -c "import importlib, sys; import app; print(\\"[boot] app imported OK\\")" || exit 1\nuvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}\n' > /app/run.sh \
82
  && chmod +x /app/run.sh
83
 
84
  EXPOSE 7860
85
  CMD ["sh", "-c", "/app/run.sh"]
86
+
87
+ # ------------------------------------------------------------
88
+ # End of Dockerfile
89
+ # force rebuild 2025-11-05
90
+ # ------------------------------------------------------------