File size: 927 Bytes
6992e29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM jupyterlab/jupyterlab:latest

# Set the working directory to /app
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

COPY public /app/public

# Install the dependencies
RUN pip install -r requirements.txt

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

# Expose the port 8888 for JupyterLab (no se utiliza, solo para referencia)
EXPOSE 8888

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

# Run JupyterLab when the container starts
CMD ["jupyter", "lab", "--port", "8888", "--no-browser", "--allow-root"]

# Use Nginx as a reverse proxy
FROM nginx:latest

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

# Expose the port 7860 for Nginx
EXPOSE 7860

# Set the environment variables
ENV NGINX_PORT=7860

# Run Nginx when the container starts
CMD ["nginx", "-g", "daemon off;"]