Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +14 -7
Dockerfile
CHANGED
|
@@ -1,24 +1,31 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
libzbar0 \
|
|
|
|
| 7 |
ffmpeg \
|
| 8 |
libsm6 \
|
| 9 |
libxext6 \
|
| 10 |
cmake \
|
|
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Set
|
| 14 |
WORKDIR /app
|
| 15 |
|
| 16 |
-
# Copy requirements
|
| 17 |
COPY requirements.txt .
|
| 18 |
-
RUN pip install -r requirements.txt
|
| 19 |
|
| 20 |
-
# Copy the
|
| 21 |
COPY . .
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
# Run the application
|
| 24 |
-
CMD ["streamlit", "run", "app.py"]
|
|
|
|
| 1 |
+
# Dockerfile
|
| 2 |
+
|
| 3 |
+
# Use the official Python image
|
| 4 |
FROM python:3.10-slim
|
| 5 |
|
| 6 |
+
# Install system dependencies
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
libzbar0 \
|
| 9 |
+
libgl1-mesa-glx \
|
| 10 |
ffmpeg \
|
| 11 |
libsm6 \
|
| 12 |
libxext6 \
|
| 13 |
cmake \
|
| 14 |
+
git \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
+
# Set the working directory
|
| 18 |
WORKDIR /app
|
| 19 |
|
| 20 |
+
# Copy the requirements file and install dependencies
|
| 21 |
COPY requirements.txt .
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
+
# Copy the application code
|
| 25 |
COPY . .
|
| 26 |
|
| 27 |
+
# Expose the port
|
| 28 |
+
EXPOSE 7860
|
| 29 |
+
|
| 30 |
# Run the application
|
| 31 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|