Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Fixed issue in which datalab does not start for GPU instances #2147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/cli/commands/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@
--env='DATALAB_GIT_AUTHOR={3}' \
--env='DATALAB_INITIAL_USER_SETTINGS={4}' \
{0}
ExecStop=-/usr/bin/docker stop datalab
ExecStopPost=-/usr/bin/docker rm -f datalab
Restart=always
RestartSec=1

Expand Down
12 changes: 8 additions & 4 deletions tools/cli/commands/creategpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
permissions: 0755
owner: root
content: |
NVIDIA_DRIVER_VERSION=390.46
NVIDIA_DRIVER_VERSION=418.67
COS_NVIDIA_INSTALLER_CONTAINER=gcr.io/cos-cloud/cos-gpu-installer:latest
NVIDIA_INSTALL_DIR_HOST=/var/lib/nvidia
NVIDIA_INSTALL_DIR_CONTAINER=/usr/local/nvidia
Expand All @@ -96,8 +96,9 @@
User=root
Type=oneshot
RemainAfterExit=true
Environment="HOME=/home/datalab"
EnvironmentFile=/etc/nvidia-installer-env
ExecStartPre=docker-credential-gcr configure-docker
ExecStartPre=/usr/bin/docker-credential-gcr configure-docker
ExecStartPre=/bin/bash -c 'mkdir -p "${{NVIDIA_INSTALL_DIR_HOST}}" && \
mount --bind "${{NVIDIA_INSTALL_DIR_HOST}}" \
"${{NVIDIA_INSTALL_DIR_HOST}}" && \
Expand All @@ -124,8 +125,9 @@

[Service]
Environment="HOME=/home/datalab"
ExecStartPre=docker-credential-gcr configure-docker
ExecStart=/usr/bin/docker run --restart always \
ExecStartPre=/usr/bin/docker-credential-gcr configure-docker
ExecStart=/usr/bin/docker run \
--name=datalab \
-p '127.0.0.1:8080:8080' \
-v /mnt/disks/datalab-pd/content:/content \
-v /mnt/disks/datalab-pd/tmp:/tmp \
Expand All @@ -144,6 +146,8 @@
--env='DATALAB_GIT_AUTHOR={3}' \
--env='DATALAB_INITIAL_USER_SETTINGS={4}' \
{0} -c /datalab/run.sh
ExecStop=-/usr/bin/docker stop datalab
ExecStopPost=-/usr/bin/docker rm -f datalab
Restart=always
RestartSec=1

Expand Down