-
Notifications
You must be signed in to change notification settings - Fork 0
Installations
omair18 edited this page Apr 28, 2024
·
7 revisions
A buildkite based docker code. It utilizes the power of docker-compose, nvidia-docker and pytest. The sample code loads and builds a simple keras model and automated build script is run at buildkite testing profile whenever a change is committed on the master branch. Following is the step by step guide.
- OS version: Linux Mint 19.
- Docker version: 18.09.3, build 774a1f4
- Docker compose: 18.09.3, build 774a1f4.
- Cuda: 9.0
- Python: 3.6
After signing-up run the following commands on terminal.
sudo sh -c 'echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list'sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198-
sudo apt-get update && sudo apt-get install -y buildkite-agent
Configure your agent token. -
sudo sed -i "s/xxx/your-token-here/g" /etc/buildkite-agent/buildkite-agent.cfg
Start the agent. sudo systemctl enable buildkite-agent && sudo systemctl start buildkite-agent-
sudo chmod 777 /var/run/docker.sock
Built-kite will keep the testing repositories at/var/lib/buildkite-agent/builds/your-machine-name sudo apt install apt-transport-https ca-certificates curl software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu bionic stable"sudo apt update-
sudo apt install docker-ce
To execute docker without sudo. sudo usermod -aG docker ${USER}su - ${USER}sudo usermod -aG docker ${USER}sudo curl -L "https://github.com/docker/compose/releases/download/1.19.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-composeexport distribution=ubuntu22.04curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.listsudo apt-get updatesudo apt-get install nvidia-docker2sudo nvidia-ctk runtime configure --runtime=dockersudo systemctl restart docker