Skip to content

Instantly share code, notes, and snippets.

@anhqle
Last active April 5, 2018 21:50
Show Gist options
  • Save anhqle/98cee8bb3eaa06154d7d93ab18d64bf1 to your computer and use it in GitHub Desktop.
Save anhqle/98cee8bb3eaa06154d7d93ab18d64bf1 to your computer and use it in GitHub Desktop.
Docker Rstudio
# start container with correct port and bind mount
docker run -d -it -p 8788:8787 -v ~/two_sided_matching_empirical:/home/rstudio/two_sided_matching_empirical rocker/rstudio
# 8788 is the host port, to be access from browser
docker container ps # list containers
# Log into docker terminal as root (to install Miniconda)
docker exec -ti -u root container_name bash
apt update && apt install bzip2 # always update first so that the image has package cache
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
miniconda3/bin/conda install numpy scipy pandas
sudo adduser rstudio sudo
# Use Rstudio terminal
source .bashrc # otherwise things in there not run automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment