Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -27
Dockerfile
CHANGED
|
@@ -1,36 +1,19 @@
|
|
| 1 |
-
|
| 2 |
-
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 6 |
libglib2.0-0 \
|
| 7 |
-
libsm6 \
|
| 8 |
-
libxrender1 \
|
| 9 |
-
libxext6 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Set the working directory
|
| 13 |
-
WORKDIR /app
|
| 14 |
-
|
| 15 |
-
# Copy necessary files into the container
|
| 16 |
-
COPY requirements.txt .
|
| 17 |
-
COPY streamlit_app.py .
|
| 18 |
-
|
| 19 |
# Install Python dependencies
|
|
|
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
# Run the app
|
| 26 |
-
CMD ["streamlit", "run", "streamlit_app.py"]
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
FROM python:3.10-slim
|
| 30 |
-
|
| 31 |
-
COPY requirements.txt .
|
| 32 |
-
RUN pip install -r requirements.txt
|
| 33 |
-
|
| 34 |
-
COPY streamlit_app.py .
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
|
|
|
| 2 |
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install system dependencies required by OpenCV
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
+
libgl1 \
|
| 8 |
libglib2.0-0 \
|
|
|
|
|
|
|
|
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Install Python dependencies
|
| 12 |
+
COPY requirements.txt ./
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Copy app files
|
| 16 |
+
COPY . .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
# Start Streamlit app
|
| 19 |
+
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|