Spaces:
Sleeping
Sleeping
# Use a base image with Python 3.11 | |
FROM jupyter/base-notebook:python-3.11.6 | |
# Copy the requirements file into the container | |
COPY requirements.txt . | |
# Install the required Python packages | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Switch to root user to install system packages | |
USER root | |
# Install required system packages | |
RUN apt-get update && apt-get install -y xorg libgomp1 | |
# Create directory for pages and copy content | |
RUN mkdir -p /home/jovyan/pages | |
COPY /pages /home/jovyan/pages | |
# Set environment variables for PROJ_LIB if necessary | |
ENV PROJ_LIB='/opt/conda/share/proj' | |
# Ensure the notebook user has access to the content | |
RUN chown -R ${NB_UID} /home/jovyan | |
USER ${NB_USER} | |
# Expose the necessary port | |
EXPOSE 8765 | |
# Define the command to run the application | |
CMD ["solara", "run", "/home/jovyan/pages", "--host=0.0.0.0"] |