mimoralea / gdrl

Grokking Deep Reinforcement Learning
https://www.manning.com/books/grokking-deep-reinforcement-learning
BSD 3-Clause "New" or "Revised" License
798 stars 231 forks source link

include development container files #30

Open MatthewCaseres opened 1 year ago

MatthewCaseres commented 1 year ago

I would like to run your code in codespaces. I think there would need to be a devcontainer.json file pointing to your Dockerfile.

mimoralea commented 1 year ago

Can you create one? I'm not familiar with "codespaces".

MatthewCaseres commented 1 year ago

If you click on "Code" where you would normally clone a repo in the GitHub UI it will give you the option to open the repo as a codespace. When you do this it will open an editor backed by a cloud instance. Even without configuring any codespace configuration files miniconda will be preinstalled. So all that is really needed is an environment.yml file which pins the dependencies.

The dockerfile which is included might not work if you rebuilt it, since the version of gym isn't specified. Some alternative to using the docker image provided would be really nice, I'm running out of storage on my computer and the image is very large.

Are there any dependencies which can't be managed by conda?

mimoralea commented 1 year ago

Can you modify the repo using the package versions on #29 and submit a pull request?

MatthewCaseres commented 1 year ago

Yes I will try to create an environment.yml file and rerun the notebooks. Thank you for the printout of the versions.

mimoralea commented 1 year ago

To you for the report and the initiative.

MatthewCaseres commented 1 year ago

You can open up a codespace on this branch - https://github.com/MatthewCaseres/gdrl/tree/codespace-matthewcaseres-legendary-space-happiness-rpgq4564pgxf57p5. The environment.yml file automatically installs into the base Conda environment.

Users can also open it locally using devcontainers feature of VS code.

The environment.yml file works up to chapter 4 but I still need to install PyTorch and some other things. I will submit the PR after running all of the notebooks (finishing the book). It may take a bit to work through the book, but I'm hopeful that this will work.