File size: 847 Bytes
70f1d25
 
afd327d
70f1d25
 
afd327d
70f1d25
 
afd327d
70f1d25
afd327d
 
70f1d25
 
afd327d
70f1d25
 
 
afd327d
70f1d25
 
afd327d
70f1d25
 
 
afd327d
70f1d25
 
afd327d
70f1d25
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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"]