Docker image for fastai with pytorch cpu

(Vishal R) #1

I’m searching for a docker image with fastai and pytorch-cpu. All the images I’ve seen has pytorch with cuda. Where can I find one with pytorch-cpu?

1 Like

(Bhoomit Vasani) #2

I’m building it with anaconda. Can share it if you like.

Will have to remove other stuff though. Let me know.


(Vishal R) #3

Can you please share it @bhoomit ?

Thank you


(Bhoomit Vasani) #5

Give me a day. I will have to build once I remove all the “unsharable” changes.


(Vishal R) #6

Okay. Thank you :slight_smile:


(Bhoomit Vasani) #7

Here you go.

Let me know if you face any issues.

1 Like

(Vishal R) #8

Thank you @bhoomit


(Kevin Cheng) #9

@BBloggsbott: Did you end up getting this docker image to work ? Or was some finesse needed ?

@bhoomit: When I tried the docker build step, I would keep getting an error when it tries the conda activate command, complaining that conda init has not been done, or a logoff/logon was required.

Thanks for any ideas here.

Removed zstd-1.4.0-h3b9ef0a_0.tar.bz2
Removed pandas-0.24.2-py37hb3f55d8_0.tar.bz2
Removed cudatoolkit-10.0.130-0.tar.bz2
Removed mkl-2019.4-243.tar.bz2
Removed gst-plugins-base-1.14.5-h0935bb2_0.tar.bz2
WARNING: /root/.conda/pkgs does not exist
Cache location: /opt/conda/pkgs
Will remove the following packages:

libblas-3.8.0-7_openblas 21 KB
liblapack-3.8.0-7_openblas 21 KB
libcblas-3.8.0-7_openblas 21 KB
pthread-stubs-0.4-h14c3975_1001 12 KB
matplotlib-3.1.0-py37_1 17 KB

Total: 90 KB

removing libblas-3.8.0-7_openblas
removing liblapack-3.8.0-7_openblas
removing libcblas-3.8.0-7_openblas
removing pthread-stubs-0.4-h14c3975_1001
removing matplotlib-3.1.0-py37_1
no change /opt/conda/condabin/conda
no change /opt/conda/bin/conda
no change /opt/conda/bin/conda-env
no change /opt/conda/bin/activate
no change /opt/conda/bin/deactivate
no change /opt/conda/etc/profile.d/
no change /opt/conda/etc/fish/conf.d/
no change /opt/conda/shell/condabin/Conda.psm1
no change /opt/conda/shell/condabin/conda-hook.ps1
no change /opt/conda/lib/python3.7/site-packages/xonsh/conda.xsh
no change /opt/conda/etc/profile.d/conda.csh
modified /root/.bashrc

==> For changes to take effect, close and re-open your current shell. <==

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.
To initialize your shell, run

$ conda init <SHELL_NAME>

Currently supported shells are:

  • bash
  • fish
  • tcsh
  • xonsh
  • zsh
  • powershell

See ‘conda init --help’ for more information and options.

IMPORTANT: You may need to close and restart your shell after running ‘conda init’.

The command ‘/bin/sh -c conda env create -f /code/conda_environment.yml && conda clean --all --yes && conda init bash && conda activate fastai’ returned a non-zero code: 1

$ docker run -it fastai-docker:cpu bash
Unable to find image ‘fastai-docker:cpu’ locally
docker: Error response from daemon: pull access denied for fastai-docker, repository does not exist or may require ‘docker login’.
See ‘docker run --help’.


(Bhoomit Vasani) #10

Sorry for this issue. It actually worked fine when I built earlier.

Now fixed:

Rebuild and let me know if you still face this issue.


(Vishal R) #11

@phule888, Sorry for the late response. I just changed my laptop and haven’t gotten to using the image yet. I’ll you know in a day or two.