Bread45879 commited on
Commit
4e96cfe
·
verified ·
1 Parent(s): de22540

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -2
Dockerfile CHANGED
@@ -1,9 +1,20 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
3
  WORKDIR /app
4
- COPY . /app
5
 
6
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
7
 
 
8
  EXPOSE 7860
 
 
9
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1
6
+
7
  WORKDIR /app
 
8
 
9
+ # 1) 의존성 설치
10
+ COPY requirements.txt .
11
+ RUN python -m pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
12
+
13
+ # 2) 앱 복사
14
+ COPY . .
15
 
16
+ # 3) Space 기본 포트
17
  EXPOSE 7860
18
+
19
+ # 4) FastAPI 실행
20
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]