Yermek68 commited on
Commit
f692008
·
verified ·
1 Parent(s): a3ee9f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,13 +1,18 @@
1
- FROM python:3.9
2
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
 
10
  EXPOSE 7860
11
 
12
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
13
 
 
1
+ FROM python:3.10-slim
2
 
3
+ # Устанавливаем рабочую директорию
4
  WORKDIR /app
5
 
6
+ # Копируем зависимости и устанавливаем
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # Копируем остальной код
11
  COPY . .
12
 
13
+ # Hugging Face Spaces требуют порт 7860
14
  EXPOSE 7860
15
 
16
+ # Команда запуска FastAPI через Uvicorn
17
+ CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
18