Inayatgaming commited on
Commit
d6f55cd
·
verified ·
1 Parent(s): 179bff5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1
4
+ ENV PIP_NO_CACHE_DIR=1
5
+ ENV HF_HOME=/data/.cache/huggingface
6
+ ENV TRANSFORMERS_CACHE=/data/.cache/huggingface
7
+
8
+ WORKDIR /app
9
+
10
+ # Install ffmpeg and clean apt cache
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends \
13
+ ffmpeg \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Install Python dependencies
17
+ COPY requirements.txt .
18
+
19
+ RUN pip install --upgrade pip && \
20
+ pip install -r requirements.txt
21
+
22
+ # Copy application
23
+ COPY . .
24
+
25
+ # Hugging Face Spaces uses port 7860
26
+ EXPOSE 7860
27
+
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]