Update Dockerfile
Browse files- 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 |
-
#
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
# Start
|
20 |
-
CMD ["
|
|
|
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"]
|