asv7j commited on
Commit
b27a0d8
·
verified ·
1 Parent(s): 99d44ee

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -1,6 +1,9 @@
1
  # Use the official Jupyter Docker image
2
  FROM jupyter/base-notebook:latest
3
 
 
 
 
4
  # Install Jupyter Lab and additional packages
5
  RUN pip install --no-cache-dir \
6
  jupyterlab \
@@ -13,8 +16,14 @@ RUN pip install --no-cache-dir \
13
  scikit-learn \
14
  pandas
15
 
16
- # Expose the port Jupyter Lab will run on
17
- EXPOSE 8888
 
 
 
 
 
 
18
 
19
- # Start Jupyter Lab
20
- CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]
 
1
  # Use the official Jupyter Docker image
2
  FROM jupyter/base-notebook:latest
3
 
4
+ # Switch to the root user to perform privileged actions
5
+ USER root
6
+
7
  # Install Jupyter Lab and additional packages
8
  RUN pip install --no-cache-dir \
9
  jupyterlab \
 
16
  scikit-learn \
17
  pandas
18
 
19
+ # Copy the app.py script to the container
20
+ COPY app.py /home/jovyan/app.py
21
+
22
+ # Expose the ports Jupyter Lab and the redirect server will run on
23
+ EXPOSE 8888 8000
24
+
25
+ # Switch back to the notebook user
26
+ USER $NB_UID
27
 
28
+ # Start the servers using app.py
29
+ CMD ["python", "/home/jovyan/app.py"]