Merge branch 'feature/docker-updates' into develop

pull/111/head
JulioV 2021-01-05 18:38:36 -05:00
commit 9a55efaced
5 changed files with 59 additions and 18 deletions

View File

@ -72,7 +72,7 @@ jobs:
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.RAPIDS_RELEASES_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}

View File

@ -15,6 +15,7 @@ RUN apt update && apt install -y r-base
RUN apt install -y pandoc
RUN apt install -y git
RUN apt-get update && apt-get install -y vim
RUN apt-get update && apt-get install -y nano
RUN apt update && apt install -y unzip
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
@ -42,7 +43,7 @@ RUN conda update -n base -c defaults conda
WORKDIR /rapids
RUN conda env create -f environment.yml -n rapids
RUN Rscript --vanilla -e 'install.packages("rmarkdown", repos="http://cran.us.r-project.org")'
RUN R -e 'renv::restore()'
RUN R -e 'renv::restore(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/focal/latest"))'
ADD https://osf.io/587wc/download data/external
RUN mv data/external/download data/external/rapids_example.sql.zip
RUN unzip data/external/rapids_example.sql.zip

View File

@ -1,5 +1,10 @@
# Change Log
## Next version v0.3.2
- Update docker and linux instructions to use RSPM binary repo for for faster installation
- Update CI to create a release on a tagged push that passes the tests
- Clarify in DB credential configuration that we only support MySQL
- Add Windows installation instructions
## v0.3.1
- Update installation docs for RAPIDS' docker container
- Fix example analysis use of accelerometer data in a plot

View File

@ -37,9 +37,10 @@ When you are done with this configuration, go to [executing RAPIDS](../execution
MY_GROUP
```
!!! hint
If you are using RAPIDS' docker container and Docker-for-mac or Docker-for-Windows 18.03+, connect to your MySQL database using the host `host.docker.internal` instead of `127.0.0.1`
If you are using RAPIDS' docker container and Docker-for-mac or Docker-for-Windows 18.03+, you can connect to a MySQL database in your host machine using the `host.docker.internal` instead of `127.0.0.1` or `localhost`
!!! note
You can ignore this step if you are only processing Fitbit data in CSV files.
- You can ignore this step if you are only processing Fitbit data in CSV files.
- RAPIDS only supports MySQL/MariaDB databases. If you would like to add support for a different database engine get in touch and we can discuss how to implement it.
---
## Timezone of your study

View File

@ -1,6 +1,6 @@
# Installation
You can install RAPIDS using Docker (the fastest), or native instructions for MacOS and Ubuntu
You can install RAPIDS using Docker (the fastest), or native instructions for MacOS and Linux (Ubuntu). Windows is supported through Docker or WSL.
=== "Docker"
@ -8,7 +8,7 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
2. Pull our RAPIDS container
``` bash
docker pull moshiresearch/rapids:latest`
docker pull moshiresearch/rapids:latest
```
3. Run RAPIDS\' container (after this step is done you should see a
@ -44,6 +44,9 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
- Double click on the `moshiresearch/rapids` container in the`CONTAINERS` tree
- A new VS Code session should open on RAPIDS main folder inside the container.
!!! warning
If you installed RAPIDS using Docker for Windows on Windows 10, the container will have [limits](https://stackoverflow.com/questions/43460770/docker-windows-container-memory-limit) on the amount of RAM it can use. If you find that RAPIDS crashes due to running out of memory, [increase](https://stackoverflow.com/a/56583203/6030343) this limit.
=== "MacOS"
We tested these instructions in Catalina
@ -108,7 +111,7 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
=== "Ubuntu"
We tested on Ubuntu 18.04 & 20.04
We tested RAPIDS on Ubuntu 18.04 & 20.04. Note that the necessary Python and R packages are available in other Linux distributions, so if you decide to give it a try, let us know and we can update these docs.
1. Install dependencies
@ -133,15 +136,17 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
4. Add R's repository
1. For 18.04
``` bash
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
```
=== "Ubuntu 18.04 Bionic"
1. For 20.04
``` bash
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
```
``` bash
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
```
=== "Ubuntu 20.04 Focal"
``` bash
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
```
5. Install R 4.0. If you have other instances of R, we recommend uninstalling them
@ -181,14 +186,35 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
conda activate MY_ENV_NAME
```
7. Install R packages and virtual environment:
7. Install the R virtual environment management package (renv)
``` bash
snakemake -j1 renv_install
snakemake -j1 renv_restore
```
8. Restore the R virtual environment
=== "Ubuntu 18.04 Bionic (fast)"
Run the following command to restore the R virtual environment using [RSPM](https://packagemanager.rstudio.com/client/#/repos/1/overview) binaries
```bash
R -e 'renv::restore(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"))'
```
=== "Ubuntu 20.04 Focal (fast)"
Run the following command to restore the R virtual environment using [RSPM](https://packagemanager.rstudio.com/client/#/repos/1/overview) binaries
```bash
R -e 'renv::restore(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/focal/latest"))'
```
=== "Ubuntu (slow)"
If the fast installation command failed for some reason, you can restore the R virtual environment from source:
```bash
R -e 'renv::restore()'
```
!!! note
This step could take several minutes to complete, especially if you have less than 3Gb of RAM or packages need to be compiled from source. Please be patient and let it run until completion.
@ -201,3 +227,11 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
``` bash
./rapids -j1
```
=== "Windows"
There are several options varying in complexity:
- You can use our Docker instructions (tested)
- You can use our Ubuntu 20.04 instructions on [WSL2](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (not tested but it will likely work)
- Native installation (experimental). If you would like to contribute to RAPIDS you could try to install MySQL, miniconda, Python, and R 4.0+ in Windows and restore the Python and R virtual environments using steps 6 and 7 of the instructions for Mac. You can [get in touch](../../team) if you would like to discuss this with the team.