sam12345324 commited on
Commit
c24eb47
·
verified ·
1 Parent(s): 5708b11

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -17
Dockerfile CHANGED
@@ -1,24 +1,17 @@
1
- FROM python:3.10-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y \
6
- fonts-ebgaramond \
7
- ffmpeg \
8
- libsndfile1 \
9
- fonts-dejavu \
10
- build-essential \
11
- g++ \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
- COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- COPY api_server /app/api_server
18
- COPY utils /app/utils
19
- COPY video /app/video
20
- COPY server.py /app/server.py
21
 
22
- ENV PYTHONUNBUFFERED=1
23
-
24
- CMD ["fastapi", "run", "server.py", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ # Use Python base image
2
+ FROM python:3.10
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Copy files
8
+ COPY . /app
 
 
 
 
 
 
9
 
10
+ # Install requirements
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Expose port (Hugging Face Spaces uses 7860 by default, but FastAPI can run on 8000)
14
+ EXPOSE 8000
 
 
15
 
16
+ # Run FastAPI with uvicorn
17
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]