File size: 959 Bytes
c520e0a
511bc62
6992e29
 
 
 
 
 
 
 
f1bd50d
 
 
6992e29
c520e0a
511bc62
f1bd50d
 
 
6992e29
 
 
511bc62
6992e29
 
511bc62
 
 
6992e29
 
 
 
511bc62
 
6992e29
 
511bc62
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
FROM jupyter/scipy-notebook

# Set the working directory to /app
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

COPY public /app/public

# Switch to root user to install system packages
USER root

# Install the dependencies
RUN apt-get update && apt-get install -y wget nginx && pip install -r requirements.txt

# Switch back to the original user
USER ${NB_UID}

# Copy the JupyterLab configuration file
COPY jupyter_config.py /etc/jupyterlab/jupyter_config.py

# Copy the Nginx configuration file
COPY nginx.conf /etc/nginx/nginx.conf

# Expose the port 8888 for JupyterLab
EXPOSE 8888

# Expose the port 7860 for Nginx
EXPOSE 7860

# Set the environment variables
ENV JUPYTERLAB_PORT=8888
ENV JUPYTERLAB_TOKEN=your_secret_token
ENV NGINX_PORT=7860

# Copy the entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

# Run the entrypoint script when the container starts
ENTRYPOINT ["/app/entrypoint.sh"]