Skip to content

Instantly share code, notes, and snippets.

@rlan
rlan / tensorflow_vs_cuda_cudnn_vs_driver.md
Last active June 13, 2018 02:55
Version matching of tensorflow vs cuda cudnn vs driver

My docker notes:

FROM tensorflow/tensorflow:1.8.0-gpu-py3
# tensorflow 1.5+ needs cuda 9.
# tensorflow 1.4.1 needs cuda 8.

Release 1.7.0

@rlan
rlan / global-gitignore.md
Created June 13, 2018 00:59 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@rlan
rlan / carla_0.8.3_docker.sh
Last active January 24, 2019 06:27
Carla 0.8.3 docker
#!/bin/sh
nvidia-docker run -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=ID SDL_VIDEODRIVER=offscreen SDL_HINT_CUDA_DEVICE=0 carla:latest ./CarlaUE4.sh /Game/Maps/Town01 -benchmark -carla-server -fps=10 -world-port=2000 -windowed -ResX=100 -ResY=100 -carla-no-hud
@rlan
rlan / tmux_ssh_remote.md
Created June 10, 2018 23:08
Attach tmux session on a remote terminal over ssh
 ssh <remote-host> -t tmux attach-session -t <session-name>
@rlan
rlan / rsync_ssh.sh
Last active January 24, 2019 06:28
rsync ssh example
#!/bin/sh -x
# rsync ssh example
# $1 - source folder
# $2 - machine name
# $3 - target folder
if [ $# -eq 0 ]; then
echo "No arguments supplied"
else
rsync -avzhe ssh $1 $2:$3
@rlan
rlan / launch_a_docker_image.sh
Last active January 24, 2019 06:29
Launch a docker image
#!/bin/sh -x
# Launch a jupyter docker image
# $1 - folder to mount inside the docker image
# $2 - docker image ID
if [ "$1" != "" ]; then
echo "Folder:" $1
if [ "$2" != "" ]; then
echo "Docker image:" $2
docker run -it -v $1:/notebooks -p 8888:8888 -p 6006:6006 $2