Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grid5000-code
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
grid5000-code
Commits
fd1f6e61
Commit
fd1f6e61
authored
3 years ago
by
Nicolas Perrin
Browse files
Options
Downloads
Patches
Plain Diff
[g5k-setup-nvidia-docker] Force Debian 10 image usage under Debian 11 host
parent
ed35ace2
No related branches found
No related tags found
1 merge request
!2
[g5k-setup-nvidia-docker] Force Debian 10 image usage under Debian 11 host
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/g5k-setup-nvidia-docker
+12
-1
12 additions, 1 deletion
bin/g5k-setup-nvidia-docker
with
12 additions
and
1 deletion
bin/g5k-setup-nvidia-docker
+
12
−
1
View file @
fd1f6e61
...
@@ -28,9 +28,20 @@ def main
...
@@ -28,9 +28,20 @@ def main
# (probably because it exists on ubuntu)
# (probably because it exists on ubuntu)
ret
&=
sh
(
'sudo ln -s /sbin/ldconfig /sbin/ldconfig.real'
).
first
ret
&=
sh
(
'sudo ln -s /sbin/ldconfig /sbin/ldconfig.real'
).
first
else
else
ret
&=
sh
(
'. /etc/os-release; curl -s -L https://nvidia.github.io/nvidia-docker/$ID$VERSION_ID/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list'
).
first
distrib_codename
=
`lsb_release -cs`
.
strip
# Workaround: use Debian 10 image if Debian 11 host (cf. Bug #13532)
if
distrib_codename
==
'bullseye'
ret
&=
sh
(
'curl -s -L https://nvidia.github.io/nvidia-docker/debian10/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list'
).
first
puts
"Warning: As Nvidia Docker Debian 11 image is not currently released, Nvidia Docker Debian 10 image is used !"
else
ret
&=
sh
(
'. /etc/os-release; curl -s -L https://nvidia.github.io/nvidia-docker/$ID$VERSION_ID/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list'
).
first
end
end
end
ret
&=
sh
(
'sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit'
).
first
ret
&=
sh
(
'sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit'
).
first
# Workaround if Debian 11 host (cf. Bug #13532)
if
distrib_codename
==
'bullseye'
ret
&=
sh
(
'sudo sed -i \'s|^#ldconfig.*|ldconfig = "/sbin/ldconfig"|\' /etc/nvidia-container-runtime/config.toml'
).
first
end
ret
&=
sh
(
'sudo systemctl restart docker'
).
first
ret
&=
sh
(
'sudo systemctl restart docker'
).
first
ret
&=
sh
(
'sudo chmod o+rw /var/run/docker.sock'
).
first
if
!
options
[
:install
]
ret
&=
sh
(
'sudo chmod o+rw /var/run/docker.sock'
).
first
if
!
options
[
:install
]
ret
ret
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment