Spaces:
Running
Running
Update DockerFile
Browse files- DockerFile +36 -11
DockerFile
CHANGED
|
@@ -1,11 +1,36 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python image from the Docker Hub
|
| 2 |
+
FROM python:3.12.3
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /home/user/app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
git \
|
| 10 |
+
git-lfs \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
cmake \
|
| 15 |
+
rsync \
|
| 16 |
+
libgl1-mesa-glx && \
|
| 17 |
+
rm -rf /var/lib/apt/lists/* && \
|
| 18 |
+
git lfs install
|
| 19 |
+
|
| 20 |
+
# Copy the requirements file into the container
|
| 21 |
+
COPY requirements.txt .
|
| 22 |
+
|
| 23 |
+
# Update pip, setuptools, and wheel
|
| 24 |
+
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 25 |
+
|
| 26 |
+
# Install Python dependencies
|
| 27 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
+
|
| 29 |
+
# Copy the rest of the application code into the container
|
| 30 |
+
COPY . .
|
| 31 |
+
|
| 32 |
+
# Set environment variables if needed
|
| 33 |
+
ENV PATH="/home/user/app/.local/bin:${PATH}"
|
| 34 |
+
|
| 35 |
+
# Command to run the application
|
| 36 |
+
CMD ["streamlit", "run", "app.py"]
|