Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker gotchas #121

Closed
KiaraGrouwstra opened this issue May 31, 2018 · 6 comments
Closed

docker gotchas #121

KiaraGrouwstra opened this issue May 31, 2018 · 6 comments

Comments

@KiaraGrouwstra
Copy link

Hi. I tried running this through Docker, and ran into a few gotchas following the gitbook instructions:

  • the files in bin somehow gave me permission errors, despite being root. pasting these manually helped as a work-around.
  • the setup script used sudo a lot, but the docker container did not recognize this. removing these helped. fwiw, installing sudo helped as well.
  • source activate lab errored stating source was not recognized. I then tried:
# conda config --add channels anaconda
# conda activate lab
# conda env update
(lab) # python3 --version
Python 3.6.4
(lab) # yarn start
$ python3 run_lab.py
Traceback (most recent call last):
  File "run_lab.py", line 6, in <module>
    from slm_lab.experiment.control import Session, Trial, Experiment
  File "/opt/SLM-Lab/slm_lab/__init__.py", line 12
    with open(os.path.join(ROOT_DIR, 'config', f'{config_name}.json')) as f:
                                                                   ^
SyntaxError: invalid syntax
error Command failed with exit code 1

Trying this line in this python3 seemed not to yield syntax errors though, so f-strings do seem supported. Weird.

I haven't fully gotten this to work, but hopefully some of this may be useful for the tutorial.
I tried looking for the gitbook source in case I could add to the installation instructions based on this, but couldn't find it.

@kengz
Copy link
Owner

kengz commented Jun 1, 2018

Hey there, thanks for the report!

Yeah that is really weird f string not being recognized. It should since py 3.6. The Docker container OS is Ubuntu 14 I suppose?

There is actually a Dockerfile in the repo, but the image was built a month ago and quite outdate (see below). I recommend using that Dockerfile and the command in it to build your own locally. That avoids the bin script and sudo commands. We'll update the new setup instructions once the next release is stable.

We're actually preparing for v1.1.0 in the coming weeks. The last major PR was merged 2 days ago, so master is stable now, except for PPO and Atari DQN. So, I'd suggest using the master branch for your purpose.

Lastly, the Gitbook is here at https://legacy.gitbook.com/book/kengz/slm-lab/details and any edit requests are certainly more than welcomed :)

@KiaraGrouwstra
Copy link
Author

Hey,
Yeah, I had been using the Dockerfile in master -- the OS might well be 16.04.
I'll keep an eye out for 1.1 then!

@kengz
Copy link
Owner

kengz commented Jun 16, 2018

update: cause for issue above identified
docker yarn does not inherit shell context, hence it reverts to using python2 form the system default.
I have updated the package.json to explicitly call python. But it that still fails, use the original python commands, e.g.

conda activate lab
python run_lab.py

also @tycho01 v1.1.0 release is expected on Monday. All release features have been finished and tested, and we're updating docs and new docker build.

@KiaraGrouwstra
Copy link
Author

I'll try again then, thank you! :D

@kengz
Copy link
Owner

kengz commented Jun 17, 2018

please use the saving branch in the mean time https://github.com/kengz/SLM-Lab/tree/saving
they are to be merged monday.

@kengz
Copy link
Owner

kengz commented Jun 19, 2018

ok it's released. master branch is up to date https://github.com/kengz/SLM-Lab/releases/tag/v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants