Dockerfile for live course

Hi there!
I’ve put down dockerfile for the class. Some people asked to share it, so here it is:
https://drive.google.com/open?id=1br_ZHcJPYL9nfsg9Ur_ps5YOkjbMQoiB
For the full use you’ll also need jupyter_notebook_config.py
https://drive.google.com/file/d/1AdAloWDo1CgYQa0zcPCJxKE-n_be5BiT/view?usp=sharing
and your kaggle.json file, which you can get from your profile page on kaggle.com
What this file does:

  • Installs software, which is used and/or mentioned in notebooks
  • Install jupyterlab and some handy extensions for better experience. Jupyter notebook should also work but I never tried
  • Set’s a jupyter password, so you can acces jupyterlab without token. Changes to jupyter_notebook_config.py should be made in order to enable this. Here is the explanation, what to do https://jupyter-notebook.readthedocs.io/en/latest/public_server.html#preparing-a-hashed-password
  • Changes default shell to bash
  • Creates another user, this way inside of docker will look more like regular setup
  • Sets up conda
  • Uses conda to install pytorch, fastai and other usefull packages
  • runs jupyterlab by default

Build command: sudo docker image build -t fastai_v1:v3 .
I’m running this file executing sudo docker run -p 8888:8888/tcp -v /home/user/AI:/home/user/AI --runtime=nvidia --ipc=host fastai_v1:v3

7 Likes

Started working on the exact same thing this morning, but yours is more complete than mine at the moment. :slight_smile:

Had a test image up and running here: https://hub.docker.com/r/zerotosingularity/fastai_v3/

Might be good to create a PR and have an fastai container on Dockerhub?

Haven’t thought about that, will try to do so. Thanks!

1 Like

Let me know if you need help on anything. Was planning on doing that in the coming days, but don’t want to steal any thunder :slight_smile:
More time for me to work on other things :smiley:

1 Like

I’ve created an issue for this, will see if this is needed:

1 Like

I tried building the Dockerfile but it failed… :frowning:
Do you have it in a repo where I could contribute (a) PR(s)?

I would love to, but since it includes resources we shouldn’t share outside of this course, I wonder if it’s a good idea to create public repo with just this in it. And I don’t have a payed account to create private repo.
I’d like to wait for response on github issue first and think what to do after that.
In a mean time, you can just PM me or post here what failed and I’ll fix it.

I thought it would be ok to branch on github given the code is there in the open…

The build fails because I don’t have a kaggle.json file on my server and would upgrade the pip installation… Nothin earth shattering :slight_smile:

oh, ok. I mentioned in the post that kaggle.json is needed, but it’s easy to miss. Might be a good idea to write small guide for the file, but don’t have enough time right now :frowning: . Will have to wait till weekend.

It turns out course-v3 repo is indeed public. For some reason I though that we received access to it by some invite link, but I was obviously wrong. So with this in mind I created a repo for dockerfile and instructions.
No instruction right now but PRs are welcomed and I’ll try to handle check them ASAP.
link: deleted

Edit: probably better to just fork the original repo, here’s link for the fork https://github.com/Liberus/course-v3