abishek commited on
Commit ·
d0d4bdb
1
Parent(s): 859c4d6
Fix: Force Python 3.12 with proper Dockerfile and packages.txt
Browse files- Dockerfile +11 -9
- packages.txt +9 -0
Dockerfile
CHANGED
|
@@ -1,25 +1,27 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
# Copy requirements
|
| 11 |
COPY requirements.txt .
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
pip install -r requirements.txt
|
| 16 |
|
| 17 |
-
# Copy app files
|
| 18 |
COPY app.py .
|
| 19 |
COPY student_performance_production_bundle.pkl .
|
| 20 |
|
| 21 |
-
# Expose port (Cloud Run uses 8080)
|
| 22 |
EXPOSE 8080
|
| 23 |
|
| 24 |
-
# Run Streamlit
|
| 25 |
CMD ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
+
git \
|
| 8 |
+
git-lfs \
|
| 9 |
+
ffmpeg \
|
| 10 |
+
libsm6 \
|
| 11 |
+
libxext6 \
|
| 12 |
+
cmake \
|
| 13 |
+
rsync \
|
| 14 |
+
libgl1 \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
|
|
|
| 17 |
COPY requirements.txt .
|
| 18 |
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt && \
|
| 20 |
+
pip install --no-cache-dir streamlit
|
|
|
|
| 21 |
|
|
|
|
| 22 |
COPY app.py .
|
| 23 |
COPY student_performance_production_bundle.pkl .
|
| 24 |
|
|
|
|
| 25 |
EXPOSE 8080
|
| 26 |
|
|
|
|
| 27 |
CMD ["streamlit", "run", "app.py", "--server.port=8080", "--server.address=0.0.0.0"]
|
packages.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
build-essential
|
| 2 |
+
git
|
| 3 |
+
git-lfs
|
| 4 |
+
ffmpeg
|
| 5 |
+
libsm6
|
| 6 |
+
libxext6
|
| 7 |
+
cmake
|
| 8 |
+
rsync
|
| 9 |
+
libgl1
|