Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -10
Dockerfile
CHANGED
|
@@ -1,19 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
-
COPY
|
| 9 |
-
|
| 10 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
|
| 15 |
-
# Expose Streamlit
|
| 16 |
EXPOSE 8501
|
| 17 |
|
| 18 |
-
#
|
| 19 |
CMD ["streamlit", "run", "2.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies for OpenCV
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
libglib2.0-0 \
|
| 6 |
+
libsm6 \
|
| 7 |
+
libxrender1 \
|
| 8 |
+
libxext6 \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Set working directory
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
+
# Copy app and requirements
|
| 15 |
+
COPY 2.py /app/2.py
|
| 16 |
+
COPY requirements.txt /app/requirements.txt
|
|
|
|
| 17 |
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Expose Streamlit port
|
| 22 |
EXPOSE 8501
|
| 23 |
|
| 24 |
+
# Run the Streamlit app
|
| 25 |
CMD ["streamlit", "run", "2.py", "--server.port=8501", "--server.address=0.0.0.0"]
|