All posts by webdizz

#Docker with #Nvidia runtime for #Deep #Learning

Just recently got to know that it’s possible to leverage CUDA and cuDNN inside Docker.

Basically what is needed is corresponding Docker image that can be found here  installation of Nvidia Docker runtime and to configure Docker daemon to use nvidia as a default runtime in /etc/docker/daemon.json. as it was described here and bellow there is an example of my config:

      "default-runtime": "nvidia",
      "runtimes": {
          "nvidia": {
              "path": "/usr/bin/nvidia-container-runtime",
              "runtimeArgs": []

#Python to deal with HTTP with cookies

Recently needed to create a script to make HTTP calls along with handling of cookies, here is a code:

import urllib.request as req
from urllib.error import HTTPError
import http.cookiejar as cookie
cookie_jar = cookie.CookieJar()
opener = req.build_opener(req.HTTPCookieProcessor(cookie_jar))
cookie_request = req.Request('url', method='POST')
resp = req.urlopen(cookie_request)

#Bootstrap your #Mac

Some time ago I started to use Boxen to manage my laptop  and here is a link and  recently my MBP was stolen and it helped me a lot and saved lots of time. Also invested effort helped me a lot to bootstrap one more MBP provided by company I was working for. 

However recently it was clearly visible that Boxen is not maintained and even GitHub switched to another tool which simplifies things a lot which is called Strap.

Strap  is based on Homebrew and Homebrew Bundle using which it’s quite easy to manage installation of required software, set up services using Homebrew Services and even applications from Homebrew Cask and applications from AppStore using mas.

If there is an interest you can checkout my GitHub repositories homebrew bundle and dotfiles.