New JupyterLab Dockerfile (#17071)
Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
bf1d076e20
commit
2875c30072
2 changed files with 43 additions and 0 deletions
9
.github/workflows/docker.yaml
vendored
9
.github/workflows/docker.yaml
vendored
|
|
@ -170,6 +170,15 @@ jobs:
|
||||||
docker build -f docker/Dockerfile-runner -t $t .
|
docker build -f docker/Dockerfile-runner -t $t .
|
||||||
docker push $t
|
docker push $t
|
||||||
fi
|
fi
|
||||||
|
if [[ "${{ matrix.tags }}" == "latest-python" ]]; then
|
||||||
|
t=ultralytics/ultralytics:latest-jupyter
|
||||||
|
v=ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}-jupyter
|
||||||
|
docker build -f docker/Dockerfile-jupyter -t $t -t $v .
|
||||||
|
docker push $t
|
||||||
|
if [[ "${{ steps.check_tag.outputs.new_release }}" == "true" ]]; then
|
||||||
|
docker push $v
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
trigger-actions:
|
trigger-actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
34
docker/Dockerfile-jupyter
Normal file
34
docker/Dockerfile-jupyter
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
# Builds ultralytics/ultralytics:latest-jupyter image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
|
||||||
|
# Image provides JupyterLab interface for interactive YOLO development and includes tutorial notebooks
|
||||||
|
|
||||||
|
# Start from Python-based Ultralytics image for full Python environment
|
||||||
|
FROM ultralytics/ultralytics:latest-python
|
||||||
|
|
||||||
|
# Install JupyterLab for interactive development
|
||||||
|
RUN /usr/local/bin/pip install jupyterlab
|
||||||
|
|
||||||
|
# Create persistent data directory structure
|
||||||
|
RUN mkdir /data
|
||||||
|
|
||||||
|
# Configure YOLO directory paths
|
||||||
|
RUN mkdir /data/datasets && /usr/local/bin/yolo settings datasets_dir="/data/datasets"
|
||||||
|
RUN mkdir /data/weights && /usr/local/bin/yolo settings weights_dir="/data/weights"
|
||||||
|
RUN mkdir /data/runs && /usr/local/bin/yolo settings runs_dir="/data/runs"
|
||||||
|
|
||||||
|
# Start JupyterLab with tutorial notebook
|
||||||
|
ENTRYPOINT ["/usr/local/bin/jupyter", "lab", "--allow-root", "/ultralytics/examples/tutorial.ipynb"]
|
||||||
|
|
||||||
|
# Usage Examples -------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Build and Push
|
||||||
|
# t=ultralytics/ultralytics:latest-jupyter && sudo docker build -f docker/Dockerfile-jupyter -t $t . && sudo docker push $t
|
||||||
|
|
||||||
|
# Run
|
||||||
|
# t=ultralytics/ultralytics:latest-jupyter && sudo docker run -it --ipc=host -p 8888:8888 $t
|
||||||
|
|
||||||
|
# Pull and Run
|
||||||
|
# t=ultralytics/ultralytics:latest-jupyter && sudo docker pull $t && sudo docker run -it --ipc=host -p 8888:8888 $t
|
||||||
|
|
||||||
|
# Pull and Run with local volume mounted
|
||||||
|
# t=ultralytics/ultralytics:latest-jupyter && sudo docker pull $t && sudo docker run -it --ipc=host -p 8888:8888 -v "$(pwd)"/datasets:/data/datasets $t
|
||||||
Loading…
Add table
Add a link
Reference in a new issue