AryanSingh04 commited on
Commit
d011d82
·
verified ·
1 Parent(s): 7af1755

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -7
Dockerfile CHANGED
@@ -1,13 +1,27 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
 
 
5
 
6
- # Copy files
7
- COPY requirements.txt requirements.txt
 
 
 
 
 
 
 
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
- COPY app.py app.py
 
 
 
 
 
 
 
11
 
12
- # Run Flask app
13
- CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # System deps: ffmpeg is required for audio extraction
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ffmpeg git && \
6
+ rm -rf /var/lib/apt/lists/*
7
 
8
+ # Caches go to /tmp (writable in Spaces)
9
+ ENV HF_HOME=/tmp/huggingface
10
+ ENV XDG_CACHE_HOME=/tmp
11
+
12
+ # Workdir
13
+ WORKDIR /app
14
+
15
+ # Python deps
16
+ COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # App code
20
+ COPY app.py .
21
+
22
+ # Expose the port Spaces expects
23
+ ENV PORT=7860
24
+
25
+ # Start FastAPI with uvicorn
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
27