Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -30
Dockerfile
CHANGED
|
@@ -1,40 +1,13 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# System dependencies
|
| 6 |
-
|
| 7 |
-
RUN apt-get update && apt-get install -y
|
| 8 |
-
build-essential
|
| 9 |
-
curl
|
| 10 |
-
git
|
| 11 |
-
libglib2.0-0
|
| 12 |
-
libsm6
|
| 13 |
-
libxext6
|
| 14 |
-
libxrender1
|
| 15 |
-
libffi-dev
|
| 16 |
-
libssl-dev
|
| 17 |
-
libstdc++6
|
| 18 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
-
|
| 20 |
-
# Copy code and requirements
|
| 21 |
-
|
| 22 |
COPY requirements.txt .
|
| 23 |
-
COPY src/ ./src
|
| 24 |
-
|
| 25 |
-
# Upgrade pip and install packages
|
| 26 |
|
| 27 |
-
RUN pip install --upgrade pip
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
EXPOSE 8501
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
HEALTHCHECK CMD curl --fail [http://localhost:8501/_stcore/health](http://localhost:8501/_stcore/health) || exit 1
|
| 37 |
-
|
| 38 |
-
# Entrypoint
|
| 39 |
-
|
| 40 |
-
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|
|
|
|
| 1 |
+
FROM python:3.9-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt .
|
|
|
|
|
|
|
|
|
|
| 6 |
|
|
|
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
+
COPY . .
|
| 10 |
|
| 11 |
EXPOSE 8501
|
| 12 |
|
| 13 |
+
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.address=0.0.0.0"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|