Last active
May 30, 2024 21:30
-
-
Save adeekshith/ef871e0cf23a7bab44088c114ddb50ae to your computer and use it in GitHub Desktop.
Dockerfile to setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the Jupyter Data Science Notebook base image | |
FROM jupyter/datascience-notebook | |
# Install Node.js and npm | |
USER root | |
# Install Node.js and npm | |
RUN wget -qO- https://deb.nodesource.com/setup_20.x | bash - \ | |
&& apt-get install -y nodejs | |
# Install iJavaScript kernel | |
RUN npm install -g ijavascript | |
RUN ijsinstall --install=global | |
# Fix permissions for the jovyan user | |
RUN chmod -R 777 /home/jovyan | |
# Switch back to the notebook user | |
USER jovyan | |
# Install additional Python packages | |
RUN pip install numpy pandas matplotlib openpyxl | |
# Replace the password and ip address as you wish. Currently is is passwordless and can be accessed from any IP address | |
CMD ["start-notebook.sh", "--NotebookApp.ip='0.0.0.0'", "--NotebookApp.token=''", "--NotebookApp.password=''"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a directory and save Dockerfile there | |
# Build Docker image | |
sudo docker build -t jupyter-ds-js . | |
# Run in the background | |
sudo docker run -d --restart always -p 8888:8888 -v "${PWD}:/home/jovyan/work" jupyter-ds-js start-notebook.sh --NotebookApp.ip=0.0.0.0 --NotebookApp.token='' --NotebookApp.password='' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment