Skip to content

Instantly share code, notes, and snippets.

@steven-mi
Created April 23, 2019 13:00
Show Gist options
  • Save steven-mi/5185056cb60f10a86ffa3f27999a09e9 to your computer and use it in GitHub Desktop.
Save steven-mi/5185056cb60f10a86ffa3f27999a09e9 to your computer and use it in GitHub Desktop.
docker cheatsheet

remove Docker container

docker rm tf

stop the container

docker stop tf

start the container

docker start tf

run bash of the container tf

it = run cmd

docker exec -it tf bash

create docker image

docker image build

forward display

xhost +local: && docker run -v /tmp/.X11-unix/:/tmp/.X11-unix -e DISPLAY=$DISPLAY -it steven:opencv bash

start the docker container with GPU access

-v = mount folder

-p = mount port

NV_GPU=3 nvidia-docker run -it --name tf3 -p 8883:8883 -v ~/tensorflow:/project/notebooks -v ~/../../data/steven:/project/data  tensorflow/tensorflow:1.12.0-gpu-py3 bash

SSH Portforwarding

ssh -L 7000:localhost:7000 steven@test
# wobei '8888:localhost:8888' für 'gewünschter_lokalerport:remoteadresse:lokalerport' steht.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment