Skip to content

Instantly share code, notes, and snippets.

@eelzinaty
Last active August 27, 2018 15:08
Show Gist options
  • Save eelzinaty/1f6831f4961345024ad96e4ec31a440e to your computer and use it in GitHub Desktop.
Save eelzinaty/1f6831f4961345024ad96e4ec31a440e to your computer and use it in GitHub Desktop.
Setup Pytorch on windows using Docker

Facebook DevC - Gaza

Pytorch on windows using Docker

Installing and Using Docker

In order to use Pytorch and applying basic deep learning examples we are going to use a pre-configured docker instance. This will help us getting a ready to use environment.

1. Install docker for windows
  • To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher.
  • Make sure that Hyper-V is disabled if it is installed on your pc.
  • If you are using Windows 10 you can directly download docker and install it from Docker Store.
  • Otherwise, you can download and install Docker Toolbox.
  • After installation is done, open new cmd window and type docker ps. If you encountered an error running this command, you should follow these steps.
  • Finally, it is worth to spend few minutes on reading Get Started Tutorial
2. Run Pytorch using docker
  • Open new cmd window and run docker image ls. It should list available docker images.
  • To install a Pytorch docker image we need first to download it. run docker pull stepankuzmin/pytorch-notebook.
  • After downloading and unpacking is done, you can start new container by running this command docker run -it --rm --name="PyT" -p 8888:8888 stepankuzmin/pytorch-notebook
  • Copy the link generated and paste it on new browser window. It should point to a jupyter notebook working directory.
  • If link is not working try to replace localhost by 192.168.99.100
  • Now you are ready to rock 👍
@adarsh25may
Copy link

adarsh25may commented Aug 27, 2018

Does the PyTorch environment launched from Docker have access to the GPUs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment