Stroke-ia commited on
Commit
d88e6dd
·
verified ·
1 Parent(s): 740e526

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Installer dépendances système (pour numpy, scipy, soundfile, etc.)
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ gfortran \
7
+ libatlas-base-dev \
8
+ liblapack-dev \
9
+ libblas-dev \
10
+ libsndfile1 \
11
+ ffmpeg \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Dossier de travail
15
+ WORKDIR /app
16
+
17
+ # Copier requirements pour profiter du cache Docker
18
+ COPY requirements.txt /tmp/requirements.txt
19
+
20
+ RUN pip install --upgrade pip && \
21
+ pip install --no-cache-dir -r /tmp/requirements.txt
22
+
23
+ # Copier ton code
24
+ COPY . .
25
+
26
+ EXPOSE 7860
27
+
28
+ # Lancer l'API
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]