Yaron Koresh commited on
Commit
8e6c450
·
verified ·
1 Parent(s): 763294c

Create start_docker.sh

Browse files
Files changed (1) hide show
  1. start_docker.sh +14 -0
start_docker.sh ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ sudo apt update
4
+ sudo apt install -y curl
5
+ curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
6
+ && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
7
+ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
8
+ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
9
+ sudo sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list
10
+ sudo apt-get update
11
+ sudo apt-get install -y nvidia-container-toolkit
12
+ sudo systemctl restart docker
13
+ docker build -t hf .
14
+ docker run -d --cpus all --gpus all hf