Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -2,12 +2,12 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
curl \
|
| 8 |
-
software-properties-common \
|
| 9 |
git \
|
| 10 |
-
|
| 11 |
|
| 12 |
COPY requirements.txt ./
|
| 13 |
COPY .streamlit/ ./.streamlit/
|
|
@@ -16,10 +16,10 @@ COPY app4.py ./
|
|
| 16 |
COPY movie_list.pkl ./
|
| 17 |
COPY similarity.pkl ./
|
| 18 |
|
| 19 |
-
RUN pip3 install -r requirements.txt
|
| 20 |
|
| 21 |
EXPOSE 8501
|
| 22 |
|
| 23 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 24 |
|
| 25 |
ENTRYPOINT ["streamlit", "run", "app4.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# نثبت الحزم الأساسية فقط (من غير software-properties-common)
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
curl \
|
|
|
|
| 9 |
git \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
COPY requirements.txt ./
|
| 13 |
COPY .streamlit/ ./.streamlit/
|
|
|
|
| 16 |
COPY movie_list.pkl ./
|
| 17 |
COPY similarity.pkl ./
|
| 18 |
|
| 19 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
EXPOSE 8501
|
| 22 |
|
| 23 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 24 |
|
| 25 |
ENTRYPOINT ["streamlit", "run", "app4.py", "--server.port=8501", "--server.address=0.0.0.0"]
|