Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.8-slim
|
| 3 |
|
| 4 |
-
# ํ์ ํจํค์ง
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
git \
|
| 7 |
gcc \
|
|
@@ -9,24 +9,24 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
libglib2.0-0 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# ์์
๋๋ ํ ๋ฆฌ ์ค์
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
-
# requirements.txt ํ์ผ ๋ณต์ฌ
|
| 16 |
COPY requirements.txt /app
|
| 17 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
-
# Detectron2 ์ค์น
|
| 20 |
RUN pip install torch==1.10 torchvision==0.11.1
|
| 21 |
RUN pip install opencv-python-headless
|
| 22 |
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
|
| 23 |
|
| 24 |
-
# Gradio ๋ฐ ๊ธฐํ ํ์ํ ํจํค์ง ์ค์น
|
| 25 |
RUN pip install gradio
|
| 26 |
RUN pip install numpy Pillow scikit-learn
|
| 27 |
|
| 28 |
-
# ์ฑ ํ์ผ ๋ณต์ฌ
|
| 29 |
COPY app.py /app
|
| 30 |
|
| 31 |
-
# ์ฑ ์คํ
|
| 32 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# 1. ๋ฒ ์ด์ค ์ด๋ฏธ์ง ์ค์ (python:3.8-slim ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉ)
|
| 2 |
FROM python:3.8-slim
|
| 3 |
|
| 4 |
+
# 2. ํ์ ํจํค์ง ์ค์น
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
git \
|
| 7 |
gcc \
|
|
|
|
| 9 |
libglib2.0-0 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# 3. ์์
๋๋ ํ ๋ฆฌ ์ค์
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
+
# 4. requirements.txt ํ์ผ์ ๋ณต์ฌํ๊ณ pip ํจํค์ง ์ค์น
|
| 16 |
COPY requirements.txt /app
|
| 17 |
+
RUN pip install --upgrade pip==24.1.2 && pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# 5. Detectron2 ์ค์น
|
| 20 |
RUN pip install torch==1.10 torchvision==0.11.1
|
| 21 |
RUN pip install opencv-python-headless
|
| 22 |
RUN pip install 'git+https://github.com/facebookresearch/detectron2.git'
|
| 23 |
|
| 24 |
+
# 6. Gradio ๋ฐ ๊ธฐํ ํ์ํ ํจํค์ง ์ค์น
|
| 25 |
RUN pip install gradio
|
| 26 |
RUN pip install numpy Pillow scikit-learn
|
| 27 |
|
| 28 |
+
# 7. ์ฑ ํ์ผ ๋ณต์ฌ
|
| 29 |
COPY app.py /app
|
| 30 |
|
| 31 |
+
# 8. ์ฑ ์คํ ๋ช
๋ น์ด
|
| 32 |
CMD ["python", "app.py"]
|