Sha256: 873b01ccd1da7848626b82d2605fe980149f08bbf9dfc492ec942358034e9bba

Contents?: true

Size: 696 Bytes

Versions: 21

Compression:

Stored size: 696 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

  desc 'Run docker container [port=8888] [attach_local=$(pwd)]'
  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

21 entries across 21 versions & 1 rubygems

Version Path
pycall-1.5.1 tasks/docker.rake
pycall-1.5.0 tasks/docker.rake
pycall-1.4.2 tasks/docker.rake
pycall-1.4.1 tasks/docker.rake
pycall-1.4.0 tasks/docker.rake
pycall-1.3.1 tasks/docker.rake
pycall-1.3.0 tasks/docker.rake
pycall-1.3.0.dev tasks/docker.rake
pycall-1.2.1 tasks/docker.rake
pycall-1.2.0 tasks/docker.rake
pycall-1.2.0.beta1 tasks/docker.rake
pycall-1.1.0.rc1 tasks/docker.rake
pycall-1.0.3 tasks/docker.rake
pycall-1.0.2-x86-mingw32 tasks/docker.rake
pycall-1.0.2-x64-mingw32 tasks/docker.rake
pycall-1.0.2 tasks/docker.rake
pycall-1.0.1-x86-mingw32 tasks/docker.rake
pycall-1.0.1-x64-mingw32 tasks/docker.rake
pycall-1.0.1 tasks/docker.rake
pycall-1.0.0 tasks/docker.rake