Skip to content

sh1027/docker-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Sample Pytorch Project with Docker

Install

Clone repositry

git clone git@github.com:sh1027/docker_pytorch.git

Modify docker/.env

COMPOSE_PROJECT_NAME=$USER
UID=1000  # <- replace with your UID
GID=1000  # <- replace with your GID
WORKDIR_LOCAL=PATH_TO_WORKDIR  # <- replace with your WORKDIR
HOST_PORT=8888  # <- replace with your HOST_PORT if necessary
CONTAINER_PORT=8888  # <- replace with your CONTAINER_PORT if necessary

You can check your UID and GID from the command below.

id -u # UID
id -g # GID

Docker compose up

cd docker
docker-compose up -d

Execute command in Docker

docker exec -it -w /workspace {USER_NAME} bash

Using JupyterLab (Optional)

python -m jupyterlab --ip 0.0.0.0 --port {CONTAINER_PORT} --allow-root

Releases

No releases published

Packages

No packages published