Skip to content
forked from Giqles/kagglegym

dockerfile for kaggle script/notebook emulation with gym

License

Notifications You must be signed in to change notification settings

stfods/kagglegym

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kagglegym

This dockerfile builds from the kaggle/python image, and adds the training data and kagglegym emulation code written by Frans Slothouber.

This allows offline working on the two-sigma-financial-modeling challenge.

Installation

After you've cloned this repo, you'll need docker. These installation instructions seem pretty sensible.

When that's set up, you're almost ready to build the image. Before you do that you'll need to agree to the rules of the competition and download the training data from here.

When that's downloaded, extract the train.h5 file to the ../gym/input/ directory of this repo. Then, from the top level of this repo, you should just need to call:

docker build -t kagglegym .

From the top level of the repository. Include the .!

Health warning; the kaggle/python image is pretty large at c. 7Gb, so it might take a while to download.

Container usage

To launch the image and play around:

docker run -it kagglegym
python
>>> import kagglegym
>>> kagglegym.test()

Assuming you want to save results for local viewing, or run local code inside the image, it's usually easiest to link a directory between the local machine and the container. This command will launch the container with the current working directory linked to the container working directory:

docker run -it -v $(pwd):/wd kagglegym

And finally if you want to use this with Jupyter notebook, you'll want to link a port and pass the command to start the notebook on launching the container.

docker run -it -v $(pwd):/wd -p 8888:8888 kagglegym jupyter notebook --port=8888 --ip=0.0.0.0

If you then head to localhost:8888, in your web browser you should be able to use notebooks as normal. Again, the working directory you launched the container from will be linked to the container itself.

kagglegym usage

kagglegym should function in the same way as described in the api-overview here.

You should be able copy and paste your local code to kaggle scripts/notebooks and have it function the same way.

About

dockerfile for kaggle script/notebook emulation with gym

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%