Geraldine commited on
Commit
d4dccf3
·
verified ·
1 Parent(s): 848ee33

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.12-slim
3
+
4
+ ENV DEBIAN_FRONTEND=noninteractive \
5
+ PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ PIP_NO_CACHE_DIR=1
8
+
9
+ # OS deps (gcc pour llama-cpp-python wheel si besoin; libgomp pour BLAS)
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ build-essential curl ca-certificates git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ WORKDIR /app
15
+
16
+ COPY pyproject.toml README.md ./
17
+ RUN pip install --upgrade pip && pip install -e .[dev]
18
+
19
+ COPY . .
20
+ # Crée les dossiers pour monter les volumes
21
+ RUN mkdir -p /models /hf_cache
22
+
23
+ EXPOSE 8000
24
+ ENV MODELS_DIR=/models HF_HOME=/hf_cache
25
+
26
+ CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:8000", "slm_api.app:app"]