iot-salzburg / gpu-jupyter

GPU-Jupyter: Leverage the flexibility of Jupyterlab through the power of your NVIDIA GPU to run your code from Tensorflow and Pytorch in collaborative notebooks on the GPU.
Apache License 2.0
696 stars 231 forks source link

Error: The provided sha-commit is invalid. #152

Open fahadshery opened 2 weeks ago

fahadshery commented 2 weeks ago

Issue Description

Describe the issue I have created my own docker-compose file:

---
services:
  gpu-jupyter:
    container_name: gpu-jupyter
    build: .build
    volumes:
      - ./data:/home/jovyan/work
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    environment:
      GRANT_SUDO: "yes"
      JUPYTER_ENABLE_LAB: "yes"
      NB_UID: ${JUPYTER_UID:-1000}
      NB_GID: ${JUPYTER_GID:-1000}
      JUPYTER_TOKEN: ${JUPYTER_TOKEN}
    networks:
      - traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.gpu-jupyter.rule=Host(`jupyter.local.example.com`)"
      - "traefik.http.routers.gpu-jupyter.entrypoints=https"
      - "traefik.http.routers.gpu-jupyter.tls=true"
      - "traefik.http.routers.gpu-jupyter.tls.certresolver=cloudflare"
      - "traefik.http.services.gpu-jupyter.loadbalancer.server.port=8888"
      - "traefik.http.routers.gpu-jupyter.middlewares=default-headers@file"
    # enable sudo permissions
    user: "root"
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
              device_ids: ["0"] # select one GPU
networks:
  traefik:
    external: true

It works fine but I am unable to generate custom image e.g. I wish to install nltk package in the custom/usefulpackages.Dockerfile file.
When I try to generate the DockerFile it gives an error:

admin@datascience:~/datascience/gpu-jupyter$ ./generate-Dockerfile.sh
Set docker-stacks to commit 'e838ff397a2d9c2ad0faae051ef0ec4f20732320'.
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

Error: The provided sha-commit is invalid.
Usage: ./generate-Dockerfile.sh -c [sha-commit] # set the head commit of the docker-stacks submodule (https://github.com/jupyter/docker-stacks/commits/master).
Exiting

To Reproduce Steps to reproduce the behavior:

  1. Add nltk package name to custom/usefulpackages.Dockerfile file.
  2. git checkout v1.7_cuda-12.2_ubuntu-22.04
  3. ./generate-Dockerfile.sh -c '823cf92db4ede8f5a4836c5b7ea761e4ea3923c7'

Expected Behavior A clear and concise description of what you expected to happen.

Screenshots Here are the commit hashes I tried:

image

Environment

Operating System: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"

NVIDIA GPU and CUDA version Details: Provide details about the NVIDIA GPU, driver versions and CUDA version you are using (e.g., model, driver version nvidia-smi and nvcc --version).

GPU-Jupyter Version:

nvidia-smi
Sat Aug 31 08:43:05 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.161.08             Driver Version: 535.161.08   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  GRID P40-24Q                   On  | 00000000:01:00.0 Off |                  N/A |
| N/A   N/A    P8              N/A /  N/A |    358MiB / 24576MiB |      0%      Default |
|                                         |                      |             Disabled |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A    775690      C   python                                      210MiB |
|    0   N/A  N/A    891724      C   python                                      148MiB |
+---------------------------------------------------------------------------------------+

Docker command and parameters: docker compose up -d --build --force-recreate --remove-orphans

Browser (if applicable): Safari

Additional Context

Add any other context about the problem here, such as specific configurations or circumstances under which the bug occurs.


Please ensure that you have checked the existing issues to avoid duplicates. Thank you for contributing to making GPU-Jupyter better!

fahadshery commented 2 weeks ago

Additionally, how do I make sure it installs R as well please?

thanks

fahadshery commented 2 weeks ago

I tried with latest tag and this is what I get:

./generate-Dockerfile.sh -c latest -p mysupersecretpassword
Set docker-stacks to commit 'latest'.
WARNING, the latest commit of docker-stacks is used. This may result in version conflicts
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

./generate-Dockerfile.sh: line 61: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 62: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 68: .build/Dockerfile: No such file or directory
cat: .build/docker-stacks/docker-stacks-foundation/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 78: .build/Dockerfile: No such file or directory
cp: cannot stat '.build/docker-stacks/docker-stacks-foundation/initial-condarc': No such file or directory
cp: cannot stat '.build/docker-stacks/docker-stacks-foundation/fix-permissions': No such file or directory
cp: cannot stat '.build/docker-stacks/docker-stacks-foundation/start.sh': No such file or directory
./generate-Dockerfile.sh: line 89: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 100: .build/Dockerfile: No such file or directory
cat: .build/docker-stacks/base-notebook/Dockerfile: No such file or directory
cp: cannot stat '.build/docker-stacks/base-notebook/jupyter_server_config.py': No such file or directory
cp: cannot stat '.build/docker-stacks/base-notebook/start-notebook.sh': No such file or directory
cp: cannot stat '.build/docker-stacks/base-notebook/start-singleuser.sh': No such file or directory
cp: cannot stat '.build/docker-stacks/base-notebook/docker_healthcheck.py': No such file or directory
chmod: cannot access '.build/*': No such file or directory
./generate-Dockerfile.sh: line 113: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 120: .build/Dockerfile: No such file or directory
cat: .build/docker-stacks/minimal-notebook/Dockerfile: No such file or directory
cp: cannot stat '.build/docker-stacks/minimal-notebook/setup-scripts': No such file or directory
cp: cannot stat '.build/docker-stacks/minimal-notebook/Rprofile.site': No such file or directory
./generate-Dockerfile.sh: line 130: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 134: .build/Dockerfile: No such file or directory
cat: .build/docker-stacks/scipy-notebook/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 143: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 147: .build/Dockerfile: No such file or directory
cat: .build/docker-stacks/images/datascience-notebook/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 159: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 160: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 168: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 169: .build/Dockerfile: No such file or directory
cp: cannot stat 'extra/Getting_Started': No such file or directory
chmod: cannot access 'data/': No such file or directory
cp: cannot stat 'custom/jupyter_server_config_token_addendum.py': No such file or directory
./generate-Dockerfile.sh: line 182: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 183: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 184: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 185: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 186: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 187: .build/Dockerfile: No such file or directory
Set password to given input
./generate-Dockerfile.sh: line 201: .build/jupyter_notebook_config.json: No such file or directory
./generate-Dockerfile.sh: line 204: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 205: .build/Dockerfile: No such file or directory
./generate-Dockerfile.sh: line 206: .build/Dockerfile: No such file or directory

The GPU Dockerfile was generated successfully in file .build/Dockerfile.
To start the GPU-based Juyterlab instance, run:
  docker build -t gpu-jupyter .build/  # will take a while