This commit is contained in:
Cryptoval2 2024-06-01 16:50:15 -04:00
parent 1553a2132a
commit 53dd9e870d
3 changed files with 14 additions and 11 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/.ipynb_checkpoints/*

View File

@ -1,11 +1,20 @@
FROM pytorch/pytorch:latest
# Install Jupyter Notebook
# Install JupyterLab
RUN pip install jupyterlab
# Install additional packages
RUN pip install tensorflow
RUN pip install plotly
# Set environment variables, etc.
#ENV MY_ENV_VAR=myvalue
# Set the working directory
WORKDIR /workspace
# Expose the port for JupyterLab
EXPOSE 8888
# Command to run JupyterLab
CMD ["jupyter-lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root", "--NotebookApp.token=''"]

View File

@ -5,16 +5,9 @@ services:
build: /opt/jupyter_pytorch
container_name: my_build_jupyter
runtime: nvidia
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
environment:
- JUPYTER_ENABLE_LAB=yes
volumes:
- /opt/jupyter_pytorch/notebooks:/workspace # Map local notebook directory to container
- ./notebooks:/workspace
ports:
- "8888:8888" # Expose port 8888 to the host
command: >
bash -c "jupyter-lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''"
- "8888:8888"