Spaces:
Sleeping
Sleeping
vancyferns
commited on
Commit
·
7655a55
1
Parent(s):
64ebc01
updated dockerfile
Browse files- Dockerfile +2 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Use a lightweight official Python image as the base
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system-level dependencies for computer vision libraries
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
|
@@ -25,14 +25,13 @@ USER appuser
|
|
| 25 |
ENV DEEPFACE_HOME=/app
|
| 26 |
|
| 27 |
# Copy the requirements file from the 'model' directory
|
| 28 |
-
# This step must happen after the user switch so pip installs for 'appuser'
|
| 29 |
COPY model/requirements.txt .
|
| 30 |
|
| 31 |
# Install Python dependencies, including gunicorn
|
| 32 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
|
| 34 |
# Copy the rest of the 'model' directory's contents
|
| 35 |
-
COPY model .
|
| 36 |
|
| 37 |
# Expose the port where the Flask API will run
|
| 38 |
EXPOSE 7860
|
|
|
|
| 1 |
# Use a lightweight official Python image as the base
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Install system-level dependencies for computer vision libraries like OpenCV
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
|
|
|
| 25 |
ENV DEEPFACE_HOME=/app
|
| 26 |
|
| 27 |
# Copy the requirements file from the 'model' directory
|
|
|
|
| 28 |
COPY model/requirements.txt .
|
| 29 |
|
| 30 |
# Install Python dependencies, including gunicorn
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 32 |
|
| 33 |
# Copy the rest of the 'model' directory's contents
|
| 34 |
+
COPY model/ .
|
| 35 |
|
| 36 |
# Expose the port where the Flask API will run
|
| 37 |
EXPOSE 7860
|