Spaces:
Sleeping
Sleeping
File size: 911 Bytes
5ec0c43 af576c2 5ec0c43 af576c2 5ec0c43 af576c2 5ec0c43 af576c2 5ec0c43 4011650 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # FROM python:3.11-slim
# WORKDIR /app
# # Copier et installer les dépendances
# COPY requirements.txt ./
# RUN pip install --no-cache-dir -r requirements.txt
# # Copier le reste des fichiers
# COPY . .
# # Exposer le port utilisé par Hugging Face pour les APIs
# EXPOSE 7860
# # Commande pour lancer l'API
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
FROM python:3.11-slim
WORKDIR /app
# Installer les dépendances système nécessaires
RUN apt-get update && apt-get install -y \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# Copier et installer les dépendances Python
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copier tous les fichiers de ton projet
COPY . .
# Exposer le port utilisé par HF pour les APIs
EXPOSE 7860
# Lancer l'API avec uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|