If you have successfully installed Docker, and have copied the files from the flash drive, you are now ready for the last part of set up: setting up your Docker container.
Setting up your Docker container as described by these steps, will provide you with all the software and packages you need for this workshop.
- Be sure that you have copied
ccdl_training_rnaseq.tar.gz
from the flash drive as was instructed in these steps. If you do not have this file yet, follow those instructions before attempting to complete these next steps.
-
Open
Terminal
. You can use Spotlight Search on a Mac to find this application. -
You can navigate to your Desktop directory by copying and pasting this command into Terminal (hit Enter):
cd Desktop
- Once you are in your Desktop directory, you must extract the file with the following command:
gunzip ccdl_training_rnaseq.tar.gz
- You can then load the Docker image with
docker load
:
docker load -i ccdl_training_rnaseq.tar
This will take a minute.
- When this step completes, check that it was successful with:
docker images
You should see output like:
REPOSITORY TAG IMAGE ID CREATED SIZE
ccdl/training_rnaseq 2019-philly 16eb55269eec 19 minutes ago 5.03GB
Note that the created field may not match.
-
Install 7-Zip install if you do not already have it by downloading the
64-bit x64
program here: https://www.7-zip.org/ -
Right-click
ccdl_training_rnaseq.tar.gz
. -
Go to
7-Zip
and selectedExtract Here
. When that has finished extraction, you should seeccdl_training_rnaseq.tar
on your Desktop. -
Open your
Command Prompt
application. -
Navigate to your
Desktop
directory with:
cd Desktop
- You can load the Docker image with
docker load
:
docker load -i ccdl_training_rnaseq.tar
This will take a minute.
- When this step completes, check that it was successful with:
docker images
You should see output like:
REPOSITORY TAG IMAGE ID CREATED SIZE
ccdl/training_rnaseq 2019-philly 16eb55269eec 19 minutes ago 5.03GB
Note that the created field may not match.
- Run the container. Change the
<PASSWORD>
in the line below to whatever you'd like. Make sure to get rid of<
and>
. Also note that your chosen PASSWORD cannot have a$
.
docker run -e PASSWORD=<PASSWORD> -p 8787:8787 ccdl/training_rnaseq:2019-philly
- Open
Kitematic
- you should see an image running. Docker assigns a random name to your container. In the example below: "stoic_lamport". If you don't see a container running, try quittingKitematic
and then opening it up again, or going to the toolbar >View
>Refresh Container List
.
Settings
>Volumes
> Set local folder totraining-modules
that was transferred from the flash drive, using theCHANGE
button.
For Windows: After you set Volumes
you will may see a message in the
lower right corner of your screen that asks if you would like to 'Share it'
with Docker.
Click the Share it
button; it will ask for your credentials:
Enter your password and click OK
.
- Navigate to RStudio window.
-
In a Windows or Mac in Kitematic, go to the
Settings
>Hostname/Ports
tab and click on the blue lettering. -
Alternatively, for a Mac, you can navigate to the RStudio window by typing
localhost:8787
in your web browser
-
Log into
RStudio
. The username will be 'rstudio' and the password will be whatever you selected above (can also be accessed from theSettings
>General
panel). -
You should see a
kitematic/
folder in yourRStudio
Files panel. Click on it. If you do not see the training modules folders in the kitematic folder, raise your hand. -
To test that everything is set up, copy and paste the follow command in the R Studio
Console
window.
source("kitematic/ready_script.R")
- Click
Enter
. You should receive an indication that you are successfully set up. Keep this indicator handy for the instructors and helpers as they come around to check.
If all else fails and Kitematic is not working for you, go to your Terminal
or
Command Prompt
(for Mac or Windows respectively) and type in the following, but
replace <PATH_TO_TRAINING_FOLDERS> with the absolute path to
training-modules
that was transferred from the flash drive.
docker run -it --rm --mount type=volume,dst=/home/rstudio/kitematic,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=<PATH_TO_TRAINING_FOLDERS> -e PASSWORD=<PASSWORD> -p 8787:8787 ccdl/training_rnaseq:2019-philly
After starting your container this way, you can get to the RStudio window in a similar way as described above:
- In Mac, type:
localhost:8787
in your web browser. - In Windows, go to
Command Prompt
, type:ipconfig
and click enter. Find the number that corresponds to theVirtual Box Host Network
and theIPv4 Address
. Copy and paste it. Put that number and:8787
at the end of it in your browser.
Resume with step 5 of part 2.