bilalRHCH commited on
Commit
ee48c45
·
verified ·
1 Parent(s): 8065275

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install libsndfile for python soundfile module
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ libsndfile1 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Ensure FastAPI / web dependencies are installed
14
+ RUN pip install --no-cache-dir fastapi uvicorn pydantic python-multipart soundfile
15
+
16
+ COPY . .
17
+
18
+ # HuggingFace Spaces requires port 7860
19
+ EXPOSE 7860
20
+
21
+ # We use server:app instead of app:app because we created server.py
22
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]