h-rand commited on
Commit
92d4711
·
verified ·
1 Parent(s): 83ea16d

Create 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
+ # 1. Libs système pour l'audio
6
+ RUN apt-get update && apt-get install -y \
7
+ libsndfile1 \
8
+ build-essential \
9
+ pkg-config \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # 2. Pip
13
+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel
14
+ RUN pip install --no-cache-dir "numpy<2.0.0"
15
+
16
+ # 3. Installation
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # 4. Code
21
+ COPY app.py .
22
+
23
+ # 5. Cache & Permissions
24
+ ENV HF_HOME=/app/cache
25
+ RUN mkdir -p /app/cache && chmod 777 /app/cache
26
+
27
+ # 6. Start
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]