anfastech commited on
Commit
c9f07b9
·
1 Parent(s): bc8eadd

Adding Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies FIRST
6
+ RUN apt-get update && apt-get install -y \
7
+ ffmpeg \
8
+ libsndfile1 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements
12
+ COPY requirements.txt .
13
+
14
+ # Install Python dependencies in CORRECT ORDER
15
+ # numpy MUST be first, before torch/torchaudio
16
+ RUN pip install --no-cache-dir "numpy>=1.24.0,<2.0.0"
17
+
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy application code
21
+ COPY . .
22
+
23
+ # Expose port
24
+ EXPOSE 7860
25
+
26
+ # Run with proper Python settings
27
+ ENV PYTHONUNBUFFERED=1
28
+ CMD ["python", "app.py"]