Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yufree authored Aug 29, 2024
1 parent dcc791e commit d7ab741
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions deepspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,22 @@ RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Install Jupyter and ipykernel in the virtual environment
RUN pip install jupyter ipykernel
RUN pip install jupyter ipykernel notebook

# Register the kernel with Jupyter
RUN ipython kernel install --name "python3" --user
RUN python -m ipykernel install --user --name=python3

# Configure Jupyter
RUN jupyter notebook --generate-config
RUN echo "c.NotebookApp.allow_origin = '*'" >> ~/.jupyter/jupyter_notebook_config.py
RUN echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py

# Install some common VS Code extensions
RUN code-server --install-extension ms-python.python \
&& code-server --install-extension ms-toolsai.jupyter

# Expose port for code-server
EXPOSE 8080
# Expose ports for code-server and Jupyter
EXPOSE 8080 8888

# Start code-server
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password"]
# Start code-server and Jupyter notebook
CMD code-server --bind-addr 0.0.0.0:8080 --auth password & jupyter notebook --no-browser --port=8888 --allow-root

0 comments on commit d7ab741

Please sign in to comment.