Skip to content

Tensorflow GPU with Docker in WSL2 using VS Code Dev Containers

License

Notifications You must be signed in to change notification settings

robisim74/tensorflow-docker-dev-wsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensorflow Docker Dev WSL

Tensorflow GPU with Docker in WSL2 using VS Code Dev Containers

Requirements

How to use

  • Create a new repository from the template or clone the code in WSL
  • In Dockerfile:
    • Update the TensorFlow Docker image: run nvidia-smi command in your Terminal, and get the CUDA version. Then find the Tensorflow version compatible with the CUDA version here
    • Update USERNAME ARG to create a non-root user
    • Update USER_UID and USER_GID ARGs (use id command in your Terminal to get them)
    • Update required packages (optional)
  • Update pip packages in requirements.txt (optional)
  • Open your project in WSL with VS Code and reopen in Container: (F1) use the Dev Containers: Reopen in Container command

Run pyhton main.py to test it.

About

Tensorflow GPU with Docker in WSL2 using VS Code Dev Containers

Resources

License

Stars

Watchers

Forks