Created
March 1, 2021 01:42
-
-
Save flrs/e80e7cd819cbaef74f0457abb687fbfa to your computer and use it in GitHub Desktop.
GPU-powered Deep Learning for Time Series with modeltime.gluonts on Saturn Cloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Saturn Cloud Startup Script for Running GPU-enabled modeltime.gluonts | |
# | |
# How to use: | |
# 1. Create an account on saturncloud.io | |
# 2. Create a new project in Saturn Cloud | |
# 3. Select image "saturncloud/saturn-gpu:2020.12.23" as image for your project | |
# 4. Copy and paste code below into "Advanced Settings (optional)" > "Start Script (Bash)". | |
# (This code will install R, a Jupyter R kernel, modeltime.gluonts, and prepare a Python environment | |
# for executing GluonTS.) | |
# 5. The startup script takes about 40 min to run. After that, you can start Jupyter Lab in your Saturn Cloud | |
# project and run GPU-enabled modeltime.gluonts in a new Jupyter Notebook that uses the "R" kernel. | |
# | |
# More info about GPUs in modeltime.gluonts: https://business-science.github.io/modeltime.gluonts/articles/using-gpus.html | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 | |
sudo su -c "echo 'deb https://cran.rstudio.com/bin/linux/ubuntu bionic-cran40/' >>/etc/apt/sources.list" | |
sudo apt update | |
sudo apt -y install r-base libv8-dev libcurl4-openssl-dev libssl-dev | |
mkdir -p ~/.local/lib/R | |
export R_LIBS_USER=~/.local/lib/R | |
R -e "install.packages(c('IRkernel','tidymodels','tidyverse','devtools'))" | |
R -e "IRkernel::installspec()" | |
R -e "devtools::install_github('business-science/modeltime.gluonts')" | |
conda run -n saturn pip install gluonts pandas numpy pathlib mxnet-cu101 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It turns out SaturnCloud has turned this into an image so we don't need to wait the 40 minutes for an image to build.
514354729342.dkr.ecr.us-east-2.amazonaws.com/saturn-r-modeltime-gpu:2021.03.01.02.45