-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from espm-157/main
sync
- Loading branch information
Showing
7 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
# devcontainer-focused Rocker | ||
FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.3 | ||
|
||
|
||
ENV NB_USER=rstudio | ||
ENV VIRTUAL_ENV=/opt/venv | ||
ENV PATH=${PATH}:${VIRTUAL_ENV}/bin | ||
ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/c1a472465532c8349cf0ad4f3f95c86e85787dc3/scripts/install_python.sh install_python.sh | ||
RUN bash install_python.sh && rm install_python.sh | ||
|
||
|
||
RUN apt-get update && apt-get -y install libxt6 | ||
RUN /rocker_scripts/install_python.sh | ||
ADD https://raw.githubusercontent.com/rocker-org/rocker-versioned2/master/scripts/experimental/install_dev_osgeo.sh install_dev_osgeo.sh | ||
RUN bash install_dev_osgeo.sh && rm install_dev_osgeo.sh | ||
|
||
RUN chown -R rstudio:rstudio /opt/venv | ||
|
||
USER rstudio | ||
WORKDIR /home/rstudio | ||
RUN usermod -s /bin/bash rstudio | ||
|
||
COPY requirements.txt requirements.txt | ||
ENV PATH=$PATH:/home/rstudio/.local/bin | ||
|
||
RUN pip install --user -r requirements.txt && rm requirements.txt | ||
RUN python -m pip install -r requirements.txt && rm requirements.txt | ||
COPY install.R install.R | ||
RUN Rscript install.R && rm install.R | ||
|
||
# some teaching preferences | ||
RUN git config --global pull.rebase false | ||
RUN git config --global pull.rebase false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#! /usr/local/bin/Rscript | ||
# install R dependencies | ||
|
||
# We could use renv.lock approach here instead, but will force re-creation of environment from scratch | ||
# Does not provide a good way to ensure that sf/terra/gdalcubes are installed from source while other packages can be binary | ||
|
||
install.packages(c("rstac", "spData")) | ||
remotes::install_github("boettiger-lab/earthdatalogin") | ||
install.packages(c("rstac", "spData", "earthdatalogin", "quarto")) | ||
remotes::install_github('r-tmap/tmap') | ||
|
||
#install.packages(c("IRkernel", "languageserver", "httpgd")) | ||
#IRkernel::installspec() | ||
install.packages(c("IRkernel", "languageserver", "httpgd")) | ||
IRkernel::installspec() |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
sudo rstudio-server start | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
sudo cp /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf | ||
cp /etc/environment env | ||
echo "USER=$USER" >> env | ||
sudo mv env /etc/environment | ||
|
||
mkdir -p ~/.local/share/rstudio/projects_settings | ||
export RPROJ"=$(ls -d $PWD/*.Rproj)" | ||
echo ${RPROJ} > ~/.local/share/rstudio/projects_settings/last-project-path | ||
|
||
sudo rstudio-server start | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
image: ghcr.io/boettiger-lab/nasa-tops:latest | ||
tasks: | ||
- name: rstudio-init | ||
command: bash .gitpod-setup.sh |