Sha256: d475ef62c1abb906ea5b4cdb358fb2c8f20380f9c304b7224a1b28ce8242993e
Contents?: true
Size: 632 Bytes
Versions: 1
Compression:
Stored size: 632 Bytes
Contents
namespace :docker do task :build do Dir.chdir File.expand_path('../..', __FILE__) do system "docker build -f docker/Dockerfile -t rubydata/pycall ." end end task :run do require 'securerandom' require 'launchy' token = SecureRandom.hex(48) port = ENV['port'] || '8888' attach_local = File.expand_path(ENV['attach_local'] || Dir.pwd) Thread.start do sleep 3 Launchy.open("http://localhost:#{port}/?token=#{token}") end system "docker run -it -e 'JUPYTER_TOKEN=#{token}' -v #{attach_local}:/notebooks/local -p #{port}:8888 --rm --name pycall rubydata/pycall" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pycall-0.1.0.alpha.20170502 | tasks/docker.rake |