seifbenayed's picture
Update Dockerfile
0b3bc7a verified
raw
history blame contribute delete
831 Bytes
FROM python:3.10-slim
# Installer les dépendances système nécessaires
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copier les dépendances
COPY requirements.txt /app/requirements.txt
# Installation des packages dans l'ordre spécifié
RUN pip install --upgrade pip && \
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu && \
pip install -r requirements.txt && \
pip install git+https://github.com/facebookresearch/detectron2.git
# Copier tout le code dans l'image Docker
COPY . /app
# Exposer le port utilisé par Gradio
EXPOSE 7860
# Commande pour lancer ton app Gradio (modifie selon ton script)
CMD ["python", "app.py"]