Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +0 -8
Dockerfile
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# 1. Installation des outils système (Git, Make, Stockfish)
|
| 4 |
RUN apt-get update && \
|
| 5 |
apt-get install -y --no-install-recommends \
|
| 6 |
git \
|
|
@@ -9,7 +8,6 @@ RUN apt-get update && \
|
|
| 9 |
wget && \
|
| 10 |
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# 2. Création de l'utilisateur (Requis par HuggingFace)
|
| 13 |
RUN useradd -m -u 1000 user
|
| 14 |
USER user
|
| 15 |
ENV HOME=/home/user \
|
|
@@ -17,22 +15,16 @@ ENV HOME=/home/user \
|
|
| 17 |
|
| 18 |
WORKDIR /app
|
| 19 |
|
| 20 |
-
# 3. Installation des dépendances Python
|
| 21 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 22 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 23 |
|
| 24 |
-
# 4. Téléchargement et construction de la base de données d'ouvertures (CRUCIAL)
|
| 25 |
-
# On clone le repo utilisé dans ton exemple
|
| 26 |
RUN git clone https://github.com/lichess-org/chess-openings.git /app/data/lichess_openings && \
|
| 27 |
cd /app/data/lichess_openings && \
|
| 28 |
make
|
| 29 |
|
| 30 |
-
# 5. Copie du code de l'application
|
| 31 |
COPY --chown=user . /app
|
| 32 |
|
| 33 |
-
# 6. Configuration du lancement
|
| 34 |
EXPOSE 7860
|
| 35 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 36 |
|
| 37 |
-
# Lancement
|
| 38 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && \
|
| 4 |
apt-get install -y --no-install-recommends \
|
| 5 |
git \
|
|
|
|
| 8 |
wget && \
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
|
| 11 |
RUN useradd -m -u 1000 user
|
| 12 |
USER user
|
| 13 |
ENV HOME=/home/user \
|
|
|
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
|
|
|
| 18 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 19 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 20 |
|
|
|
|
|
|
|
| 21 |
RUN git clone https://github.com/lichess-org/chess-openings.git /app/data/lichess_openings && \
|
| 22 |
cd /app/data/lichess_openings && \
|
| 23 |
make
|
| 24 |
|
|
|
|
| 25 |
COPY --chown=user . /app
|
| 26 |
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 29 |
|
|
|
|
| 30 |
CMD ["python", "app.py"]
|