databio / bulker

Manager for multi-container computing environments
https://bulker.io
BSD 2-Clause "Simplified" License
24 stars 2 forks source link

Error running demo #17

Closed lgatto closed 5 years ago

lgatto commented 5 years ago

I have installed bulker for the first time. Below, I confirm that the installation was successful

$ pip install --user bulker
Requirement already satisfied: bulker in ./.local/lib/python3.7/site-packages (0.2.1)
Requirement already satisfied: jinja2 in ./.local/lib/python3.7/site-packages (from bulker) (2.10.1)
Requirement already satisfied: pyyaml>=5.1 in /usr/lib/python3.7/site-packages (from bulker) (5.1.2)
Requirement already satisfied: yacman>=0.5.2 in ./.local/lib/python3.7/site-packages (from bulker) (0.5.2)
Requirement already satisfied: logmuse>=0.2.0 in ./.local/lib/python3.7/site-packages (from bulker) (0.2.4)
Requirement already satisfied: ubiquerg>=0.4.8 in ./.local/lib/python3.7/site-packages (from bulker) (0.4.9)
Requirement already satisfied: MarkupSafe>=0.23 in ./.local/lib/python3.7/site-packages (from jinja2->bulker) (1.1.1)
Requirement already satisfied: attmap>=0.12.9 in ./.local/lib/python3.7/site-packages (from yacman>=0.5.2->bulker) (0.12.9)
Requirement already satisfied: oyaml in ./.local/lib/python3.7/site-packages (from yacman>=0.5.2->bulker) (0.9)
$ ion: 0.2.1
usage: bulker [-h] [-V] [--silent] [--verbosity V] [--logdev]
              {init,list,load,activate,run} ...

bulker - manage containerized executables

positional arguments:
  {init,list,load,activate,run}
    init                Initialize a new bulker config file
    list                List available bulker crates
    load                Load a crate from a manifest
    activate            Activate a crate by adding it to PATH
    run                 Run a command in a crate

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --silent              Silence logging. Overrides verbosity.
  --verbosity V         Set logging level (1-5 or logging module level name)
  --logdev              Expand content of logging message format.

https://bulker.databio.org

However, when I try to run the demo:

$ bulker load demo
Using default config. No config found in env var: BULKERCFG
Bulker config: /home/lgatto/.local/lib/python3.7/site-packages/bulker/templates/bulker_config.yaml
Got URL: http://hub.bulker.io/bulker/demo.yaml
Traceback (most recent call last):
  File "/home/lgatto/.local/bin/bulker", line 10, in <module>
    sys.exit(main())
  File "/home/lgatto/.local/lib/python3.7/site-packages/bulker/bulker.py", line 540, in main
    exe_template = mkabs(bulker_config.bulker.executable_template, os.path.dirname(bulker_config._file_path))
  File "/home/lgatto/.local/lib/python3.7/site-packages/bulker/bulker.py", line 459, in mkabs
    if os.path.isabs(xpand(path)):
  File "/home/lgatto/.local/lib/python3.7/site-packages/bulker/bulker.py", line 457, in xpand
    return os.path.expandvars(os.path.expanduser(path))
  File "/usr/lib/python3.7/posixpath.py", line 235, in expanduser
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Any help would be appreciated.

nsheff commented 5 years ago

try running:

export BULKERCFG="bulker_config.yaml"
bulker init -c $BULKERCFG

before bulker load ... looks like I may have a problem if you haven't already set up a config file...

lgatto commented 5 years ago

Yes, thank you, that solved it:

➜  ~ export BULKERCFG="bulker_config.yaml"
➜  ~ bulker init -c $BULKERCFG
Guessing container engine is docker.
Wrote new configuration file: bulker_config.yaml
➜  ~ bulker load demo
Bulker config: bulker_config.yaml
Got URL: http://hub.bulker.io/bulker/demo.yaml
Executable template: /home/lgatto/templates/docker_executable.jinja2
Loading manifest: 'demo'. Activate with 'bulker activate demo'.
Commands available: cowsay, fortune

and

➜  ~ bulker activate demo
Bulker config: bulker_config.yaml
Activating bulker crate: demo

[lgatto@marvin ~]$ cowsay Hello world!
Unable to find image 'nsheff/cowsay:latest' locally
latest: Pulling from nsheff/cowsay
c64513b74145: Pull complete 
01b8b12bad90: Pull complete 
c5d85cf7a05f: Pull complete 
b6b268720157: Pull complete 
e12192999ff1: Pull complete 
834a54f7272b: Pull complete 
Digest: sha256:14fa1f533678750afd09536872e068e732ae4f735c52473450495d5af760c2e3
Status: Downloaded newer image for nsheff/cowsay:latest
 ______________
< Hello world! >
 --------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
lgatto commented 5 years ago

I'll leave it to you to close the issue.