File size: 861 Bytes
f2a601b
 
33c632a
e62ec1b
 
 
427e3f9
5466fef
427e3f9
f2a601b
 
 
 
 
 
 
 
33c632a
427e3f9
e62ec1b
33c632a
427e3f9
e62ec1b
427e3f9
 
 
 
e62ec1b
 
 
427e3f9
e62ec1b
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
# Use the official Jupyter Docker image
FROM jupyter/base-notebook:latest

# Switch to the root user to perform privileged actions
USER root

# Install Jupyter Lab and additional packages
RUN pip install --no-cache-dir \
    jupyterlab \
    torch \
    tensorflow \
    transformers \
    datasets \
    matplotlib \
    seaborn \
    scikit-learn \
    pandas

# Create a directory for the webpage
RUN mkdir -p /home/jovyan/jupyterlab

# Add the HTML file to the container
COPY index.html /home/jovyan/jupyterlab/index.html

# Expose the ports Jupyter Lab and web server will run on
EXPOSE 8888 8000

# Switch back to the notebook user
USER $NB_UID

# Start both Jupyter Lab and the web server
CMD ["sh", "-c", "jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='' & cd /home/jovyan/jupyterlab && python3 -m http.server 8000"]