Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan Crain stefancrain

View GitHub Profile
@stefancrain
stefancrain / alpine.py
Last active Jan 1, 2020
Automatically upgrade pinned packages in a Dockerfile
View alpine.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# A python script to update alpine requirements in docker
#
import glob
import os
import re
import sys
from urllib.request import Request, urlopen
@stefancrain
stefancrain / setup.sh
Created Mar 18, 2020
Setup NVIDIA drivers and nvidia-container-runtime for docker on debian / ubuntu 18.04
View setup.sh
#!/bin/bash
# https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo chmod 644 /etc/apt/sources.list.d/nvidia-container-runtime.list
View Dockerfile
FROM python:buster
RUN apt-get update \
&& apt-get install -y \
cmake \
doxygen \
gir1.2-gtk-3.0 \
gobject-introspection \
libboost-all-dev \
libfftw3-dev \