Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -9
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
# Use the official FEniCS
|
| 2 |
FROM quay.io/fenicsproject/stable:latest
|
| 3 |
|
| 4 |
-
# Set environment variables
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
|
| 7 |
# Update package lists and install necessary system dependencies
|
|
@@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
python3-dev \
|
| 11 |
build-essential \
|
| 12 |
libgl1-mesa-glx \
|
|
|
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Upgrade pip to the latest version
|
|
@@ -22,16 +23,15 @@ RUN pip3 install --no-cache-dir \
|
|
| 22 |
numpy \
|
| 23 |
scikit-learn \
|
| 24 |
sympy \
|
| 25 |
-
matplotlib
|
| 26 |
-
fenics
|
| 27 |
|
| 28 |
-
# Create a directory for the
|
| 29 |
WORKDIR /app
|
| 30 |
|
| 31 |
# Copy the application code into the Docker image
|
| 32 |
COPY app.py /app/
|
| 33 |
|
| 34 |
-
# (Optional) If you have
|
| 35 |
# COPY requirements.txt /app/
|
| 36 |
|
| 37 |
# Expose the port that Gradio will run on
|
|
@@ -41,8 +41,5 @@ EXPOSE 7860
|
|
| 41 |
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 42 |
ENV GRADIO_SERVER_PORT=7860
|
| 43 |
|
| 44 |
-
# (Optional) If using a specific user, switch to that user
|
| 45 |
-
# USER your_username
|
| 46 |
-
|
| 47 |
# Define the command to run the application
|
| 48 |
CMD ["python3", "app.py"]
|
|
|
|
| 1 |
+
# Use the official FEniCS Docker image as the base
|
| 2 |
FROM quay.io/fenicsproject/stable:latest
|
| 3 |
|
| 4 |
+
# Set environment variables to prevent interactive prompts during installation
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
|
| 7 |
# Update package lists and install necessary system dependencies
|
|
|
|
| 10 |
python3-dev \
|
| 11 |
build-essential \
|
| 12 |
libgl1-mesa-glx \
|
| 13 |
+
libglib2.0-0 \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# Upgrade pip to the latest version
|
|
|
|
| 23 |
numpy \
|
| 24 |
scikit-learn \
|
| 25 |
sympy \
|
| 26 |
+
matplotlib
|
|
|
|
| 27 |
|
| 28 |
+
# Create a directory for the application
|
| 29 |
WORKDIR /app
|
| 30 |
|
| 31 |
# Copy the application code into the Docker image
|
| 32 |
COPY app.py /app/
|
| 33 |
|
| 34 |
+
# (Optional) If you have additional files like requirements.txt, include them
|
| 35 |
# COPY requirements.txt /app/
|
| 36 |
|
| 37 |
# Expose the port that Gradio will run on
|
|
|
|
| 41 |
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 42 |
ENV GRADIO_SERVER_PORT=7860
|
| 43 |
|
|
|
|
|
|
|
|
|
|
| 44 |
# Define the command to run the application
|
| 45 |
CMD ["python3", "app.py"]
|