Spaces:
Running
Running
revert old dockerfile
Browse files- Dockerfile +14 -14
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
| 3 |
-
# Install system dependencies for OpenCV
|
| 4 |
-
# Updated for Debian 13 (trixie) compatibility
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
build-essential \
|
| 7 |
libgl1 \
|
|
@@ -9,31 +9,31 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 9 |
libsm6 \
|
| 10 |
libxext6 \
|
| 11 |
libxrender-dev \
|
| 12 |
-
libgl1-mesa-dri \
|
| 13 |
-
libgtk-3-0 \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
|
| 17 |
RUN useradd -m -u 1000 user
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
ENV HOME=/home/user \
|
| 21 |
-
PATH=/home/user/.local/bin:$PATH
|
| 22 |
-
PYTHONUNBUFFERED=1
|
| 23 |
|
|
|
|
| 24 |
WORKDIR $HOME/app
|
| 25 |
|
| 26 |
-
# Copy requirements first
|
| 27 |
COPY --chown=user requirements.txt .
|
| 28 |
|
| 29 |
# Install Python dependencies
|
| 30 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 31 |
|
| 32 |
-
# Copy
|
| 33 |
COPY --chown=user . .
|
| 34 |
|
| 35 |
-
# Expose the
|
| 36 |
-
EXPOSE
|
| 37 |
|
| 38 |
-
#
|
| 39 |
-
CMD ["
|
|
|
|
| 1 |
+
# Dockerfile for ParaBeyou Skin Analysis Flask Application
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Install system dependencies required for OpenCV
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
build-essential \
|
| 7 |
libgl1 \
|
|
|
|
| 9 |
libsm6 \
|
| 10 |
libxext6 \
|
| 11 |
libxrender-dev \
|
|
|
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
|
| 15 |
RUN useradd -m -u 1000 user
|
| 16 |
+
|
| 17 |
+
# Switch to the "user" user
|
| 18 |
+
USER user
|
| 19 |
|
| 20 |
ENV HOME=/home/user \
|
| 21 |
+
PATH=/home/user/.local/bin:$PATH
|
|
|
|
| 22 |
|
| 23 |
+
# Set the working directory to the user's home directory
|
| 24 |
WORKDIR $HOME/app
|
| 25 |
|
| 26 |
+
# Copy requirements first - with proper ownership
|
| 27 |
COPY --chown=user requirements.txt .
|
| 28 |
|
| 29 |
# Install Python dependencies
|
| 30 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 31 |
|
| 32 |
+
# Copy all files with proper ownership
|
| 33 |
COPY --chown=user . .
|
| 34 |
|
| 35 |
+
# Expose the port Hugging Face Spaces uses
|
| 36 |
+
EXPOSE 7860
|
| 37 |
|
| 38 |
+
# Pour le débogage, afficher le contenu du répertoire
|
| 39 |
+
CMD ["sh", "-c", "ls -la && python app.py"]
|