Set TZDIR on M1 only, update installation for M1s

feature/plugin_sentimental
JulioV 2021-02-21 18:23:12 -05:00
parent 135ebb2478
commit 12fffb9c63
3 changed files with 12 additions and 3 deletions

View File

@ -230,6 +230,7 @@
In RAPIDS v0.1.0 we replaced `RMySQL` R package with `RMariaDB`, this error means your R virtual environment is out of date, to update it run `snakemake -j1 renv_restore` In RAPIDS v0.1.0 we replaced `RMySQL` R package with `RMariaDB`, this error means your R virtual environment is out of date, to update it run `snakemake -j1 renv_restore`
## Unrecognized output timezone "America/New_York" ## Unrecognized output timezone "America/New_York"
???+ failure "Problem" ???+ failure "Problem"
When running RAPIDS with R 4.0.3 on MacOS on M1, lubridate may throw an error associated with the timezone. When running RAPIDS with R 4.0.3 on MacOS on M1, lubridate may throw an error associated with the timezone.
```bash ```bash
@ -241,6 +242,7 @@
This is because R timezone library is not set. Please add `Sys.setenv(“TZDIR” = file.path(R.home(), “share”, “zoneinfo”))` to the file active.R in renv folder to set the timezone library. For further details on how to test if `TZDIR` is properly set, please refer to `https://github.com/tidyverse/lubridate/issues/928#issuecomment-720059233`. This is because R timezone library is not set. Please add `Sys.setenv(“TZDIR” = file.path(R.home(), “share”, “zoneinfo”))` to the file active.R in renv folder to set the timezone library. For further details on how to test if `TZDIR` is properly set, please refer to `https://github.com/tidyverse/lubridate/issues/928#issuecomment-720059233`.
## Unimplemented MAX_NO_FIELD_TYPES ## Unimplemented MAX_NO_FIELD_TYPES
???+ failure "Problem" ???+ failure "Problem"
You get the following error when downloading Fitbit data: You get the following error when downloading Fitbit data:
```bash ```bash
@ -251,6 +253,7 @@
At the moment RMariaDB [cannot handle](https://github.com/r-dbi/RMariaDB/issues/127) MySQL columns of JSON type. Change the type of your Fitbit data column to `longtext` (note that the content will not change and will still be a JSON object just interpreted as a string). At the moment RMariaDB [cannot handle](https://github.com/r-dbi/RMariaDB/issues/127) MySQL columns of JSON type. Change the type of your Fitbit data column to `longtext` (note that the content will not change and will still be a JSON object just interpreted as a string).
## Running RAPIDS on Apple Silicon M1 Mac ## Running RAPIDS on Apple Silicon M1 Mac
???+ failure "Problem" ???+ failure "Problem"
You get the following error when installing pandoc or running rapids: You get the following error when installing pandoc or running rapids:
```bash ```bash

View File

@ -48,7 +48,13 @@ You can install RAPIDS using Docker (the fastest), or native instructions for Ma
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. 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" === "MacOS"
We tested these instructions in Catalina We tested these instructions in Catalina and Big Sur
??? info "M1 Macs"
RAPIDS can run on M1 Macs, the only changes as of Feb 21, 2021 are:
- R needs to be installed via brew under Rosetta (x86 arch) due to incompatibility issues with some R libraries. To do this, run your terminal [via Rosetta](https://www.youtube.com/watch?v=nv2ylxro7rM&t=138s), then proceed with the usual brew installation command. Use x86 brew to install R and restore RAPIDS' packages (`snakemake -j1 renv_install & snakemake -j1 renv_restore`).
- There is a bug related to timezone codes. We set the correct `TZ_DIR` in `renv/activate.R` (line #19) `Sys.setenv("TZDIR" = file.path(R.home(), "share", "zoneinfo"))` (RAPIDS does this automatically).
1. Install [brew](https://brew.sh/) 1. Install [brew](https://brew.sh/)

View File

@ -15,8 +15,8 @@ local({
Sys.setenv("RENV_R_INITIALIZING" = "true") Sys.setenv("RENV_R_INITIALIZING" = "true")
on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), add = TRUE) on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), add = TRUE)
# Uncomment the line below line if you are using an M1 Mac if(grepl("Darwin", Sys.info()["sysname"], fixed = TRUE) & grepl("ARM64", Sys.info()["version"], fixed = TRUE)) # M1 Macs
# Sys.setenv("TZDIR" = file.path(R.home(), "share", "zoneinfo")) Sys.setenv("TZDIR" = file.path(R.home(), "share", "zoneinfo"))
# signal that we've consented to use renv # signal that we've consented to use renv
options(renv.consent = TRUE) options(renv.consent = TRUE)