Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# 베이스 이미지
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
# 작업 디렉터리 설정
|
|
@@ -7,11 +7,11 @@ WORKDIR /code
|
|
| 7 |
# requirements.txt 복사
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
-
# pip 최신화
|
| 11 |
RUN pip install --upgrade pip
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
RUN pip install --no-cache-dir torch==1.
|
| 15 |
|
| 16 |
# 나머지 라이브러리 설치
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -19,8 +19,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 19 |
# 앱 코드 복사
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
EXPOSE
|
| 24 |
|
| 25 |
-
# 앱 실행
|
| 26 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# 베이스 이미지 (Python 3.10)
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
# 작업 디렉터리 설정
|
|
|
|
| 7 |
# requirements.txt 복사
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
+
# pip 최신화
|
| 11 |
RUN pip install --upgrade pip
|
| 12 |
|
| 13 |
+
# PyTorch 설치 (CPU 버전)
|
| 14 |
+
RUN pip install --no-cache-dir torch==2.1.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
| 15 |
|
| 16 |
# 나머지 라이브러리 설치
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 19 |
# 앱 코드 복사
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
+
# Flask 기본 포트
|
| 23 |
+
EXPOSE 5000
|
| 24 |
|
| 25 |
+
# 앱 실행
|
| 26 |
CMD ["python", "app.py"]
|