Custom image classifier in 5 min on Mac - what's the alternative on Win/Linux

Appear torch is installed, fastai not

import torch
print(torch.__version__)

1.0.0.dev20181213

import fastai
print(fastai.__version__)

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import fastai
2 print(fastai.version)

ModuleNotFoundError: No module named ‘fastai’

My bad I did not included on the building process but you can manually install it using

conda install -y -c fastai fastai

or change your dockerfile accordingly.

RUN  ${HOME}/conda/bin/conda install -y python=${PYTHON_VERSION} jupyter notebook && \
     ${HOME}/conda/bin/conda install -y numpy mkl mkl-include setuptools cmake cffi typing pyyaml scipy mkl mkl-include cython typing pip && \
     ${HOME}/conda/bin/conda install -y -c pytorch pytorch-nightly-cpu torchvision-cpu && \
     ${HOME}/conda/bin/conda install -y -c mingfeima mkldnn && \
     ${HOME}/conda/bin/conda install -y -c fastai fastai

I believe now is your job to learn more about this things and customize as you need. :wink:

I reinstalled using the new script but appear jupiter is missing.
Using jbook command report command not found.

I remember in the old version of the docker script there was a line for installing jupiter that I didn’t find anymore in your previous post, can you post it again (if there was this line and my memory didn’t made me tricks)

What ?

I just moved to the first line man, that has no impact at all.
Take a look if you have copied correctly the entire block

My fault, corrected the script I will try again tomorrow, very late here.
Thanks for all again!

1 Like

All running and first test done, thanks!
Using this vision notebook for test
https://github.com/fastai/fastai/blob/master/examples/vision.ipynb
I completed 1 run (epoch) in 03:27
In the example is written was completed in 0:05, is meaning my virtual machine will allow me only to play with toy model I suppose.
Also noticed when I shutdown my docker image the notebook is lost, I suppose need to setup the docker windows shared folder.

1 Like

Hi , Yes

I completed 1 run (epoch) in 03:27

You are not even scratching the surface of the problem.

In the example is written was completed in 0:05, is meaning my virtual machine will allow me only to play with toy model I suppose.

Probably, CPUs have at most 16 cores / 12 cores these days that will give you roughly have the double in terms of threads. Servers on the other hand can put 4 CPUs with 28 cores each summing into 224 threads.
One single GPUs has more than 1024 threads. Thats a big difference.

Must of people here deal with experiments that takes some minutes in GPU. The same experiment on CPU will take several minutes or at leas one hour.
Also notice that the fact you are in Windows, docker is a layer on top a virtual machine, it’s not native so this creates more latency on the process and the same applies for MacOS.
Soon you will find your will for a GPU I promise :wink:

Also noticed when I shutdown my docker image the notebook is lost, I suppose need to setup the docker windows shared folder.

The way I set it you need to use a shared folder. Its better for you if you learn to set this shared folder. Because what remains from your work is your files then you can use it to save your files on that folder.

Cheers :slight_smile:

1 Like