-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·42 lines (37 loc) · 1.68 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# My first script
pip install -r requirements.txt
if [ -x "$(command -v docker)" ]; then
echo "Docker already installed"
else
read -p "Docker not found. Doy you want to install the latest version of docker now? (y/n)" choice
case "$choice" in
y|Y ) echo "Installing Docker:"
# Docker setup - commands taken from here:
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
# Uninstall old version
sudo apt-get remove docker docker-engine docker.io containerd runc
# 1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# 2. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# 3. Install the Docker Repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world;;
n|N ) echo "You will need Docker in order to run the ikFast compilers. You can manually install docker and rerun to this script"
exit;;
* ) echo "Invalid! Enter 'y' or 'n'";;
esac
fi
echo "Setting up Docker Container"
docker pull thorj/ikfast-generate-solver:firsttry
docker run -it thorj/ikfast-generate-solver:firsttry /bin/bash
exit