generated from CU-ESIIL/Postdoc_OASIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2d96777
Showing
125 changed files
with
11,401 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,44 @@ | ||
name: build-and-push-jupyterlab-image | ||
|
||
on: | ||
workflow_dispatch: # This allows you to manually trigger the action from GitHub UI. | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to dockerhub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Get lowercase repo name (for dynamic tags) | ||
id: repo_name | ||
run: | | ||
lowercase_name=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') | ||
echo "::set-output name=repo_name::${lowercase_name}" | ||
- name: Build and push latest | ||
id: docker_build_jupyterlab | ||
uses: docker/[email protected] | ||
with: | ||
context: docker/jupyterlab | ||
file: docker/jupyterlab/Dockerfile | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: true | ||
tags: | | ||
esiil/${{ steps.repo_name.outputs.repo_name }}_jupyterlab:latest | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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,34 @@ | ||
name: Sync with Template Repository | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_template: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout main repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure Git for merge | ||
run: | | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
- name: Fetch template repository | ||
run: git fetch --no-tags --no-recurse-submodules https://github.com/CU-ESIIL/Postdoc_OASIS.git +refs/heads/*:refs/remotes/template/* | ||
|
||
- name: Merge changes from template repository | ||
run: | | ||
git merge --no-commit --no-ff --allow-unrelated-histories template/main || true | ||
git checkout --ours . | ||
git add . | ||
- name: Commit changes | ||
run: git commit -am "Merge changes from template repository" | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
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,21 @@ | ||
name: Publish docs via GitHub | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: run requirements file | ||
run: pip install -r requirements.txt | ||
- name: Deploy docs | ||
run: mkdocs gh-deploy --force | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
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,48 @@ | ||
# History files | ||
.Rhistory | ||
.Rapp.history | ||
|
||
# Session Data files | ||
.RData | ||
.RDataTmp | ||
|
||
# User-specific files | ||
.Ruserdata | ||
|
||
# Example code in package build process | ||
*-Ex.R | ||
|
||
# Output files from R CMD build | ||
/*.tar.gz | ||
|
||
# Output files from R CMD check | ||
/*.Rcheck/ | ||
|
||
# RStudio files | ||
.Rproj.user/ | ||
|
||
# produced vignettes | ||
vignettes/*.html | ||
vignettes/*.pdf | ||
|
||
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 | ||
.httr-oauth | ||
|
||
# knitr and R markdown default cache directories | ||
*_cache/ | ||
/cache/ | ||
|
||
# Temporary files created by R markdown | ||
*.utf8.md | ||
*.knit.md | ||
|
||
# R Environment Variables | ||
.Renviron | ||
|
||
|
||
|
||
# translation temp files | ||
po/*~ | ||
|
||
# RStudio Connect folder | ||
rsconnect/ |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Environmental Data Science Innovation and Inclusion Lab (ESIIL) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,72 @@ | ||
# Postdoc OASIS | ||
This is the central hub for information pertaining to ESIIL Postdocs | ||
|
||
# [Your Name] | ||
|
||
Welcome to the [Your Name] repository, part of the Environmental Data Science Innovation and Inclusion Lab (ESIIL). This repository serves as the central hub for our research at ESIIL, hosting your project description, proposals, bio, codebase, and more. | ||
|
||
## Your Project | ||
|
||
[Provide a brief overview of your project here. Explain what you aim to achieve, the importance of your project, and its expected impact.] | ||
|
||
## Project Proposal | ||
|
||
[Link to the detailed project proposal document or include the proposal directly in the repository. This should outline the goals, methodologies, anticipated challenges, and projected timelines.] | ||
|
||
## Collaborators and Co-Authors | ||
|
||
[List the names and a brief description of people you work with, possibly linking to their personal or professional web pages.] | ||
|
||
- **Collaborator 1**: Brief description. | ||
- **Collaborator 2**: Brief description. | ||
- ... | ||
|
||
## Code Repository | ||
|
||
This section of the repository will include all the code developed for the project. You can structure it as follows: | ||
|
||
- **Analysis Code**: Scripts for data analysis, statistical modeling, etc. | ||
- **Data Processing**: Scripts for cleaning, merging, and managing datasets. | ||
- **Visualization**: Code for creating figures, charts, and interactive visualizations. | ||
|
||
## Meeting Notes and Agendas | ||
|
||
When you meet with your advisor, collaborators, or a team, you should take notes here. | ||
|
||
## Contributing to This Repository | ||
|
||
To maintain the quality and integrity of the repository, please adhere to the following guidelines: | ||
|
||
- Make sure all commits have a clear and concise message. | ||
- Document any major changes or decisions in the meeting notes. | ||
- Review and merge changes through pull requests to ensure oversight. | ||
|
||
## Getting Help | ||
|
||
If you encounter any issues or have questions about how to contribute, please refer to the [ESIIL Support Page](https://esiil.org/support) or contact the repository maintainers directly. | ||
|
||
## Customize Your Repository | ||
|
||
As a new working group, you'll want to make this repository your own. Here's how to get started: | ||
|
||
1. **Edit This Readme**: Replace the placeholder content with information about your specific project. Ensure that the introduction, project overview, and objectives clearly reflect your group's research focus. | ||
|
||
2. **Update Bio**: Add details about your expertise, role in the project, and professional background. Include links to personal or professional web pages to foster community engagement and collaboration. | ||
|
||
3. **Organize Your Code**: Structure your codebase in a way that is logical and accessible. Use directories and clear naming conventions to make it easy for all members to find and contribute to different parts of the project. | ||
|
||
4. **Document Your Data**: Include a data directory with README files explaining the datasets, sources, and any preprocessing steps. This will help new members understand and work with the project's data effectively. | ||
|
||
5. **Outline Your Methods**: Create a detailed METHODS.md file where you describe the methodologies, software, and tools you will be using in your research. This transparency will support reproducibility and collaborative development. | ||
|
||
6. **Set Up Project Management**: Utilize the 'Issues' and 'Projects' features on GitHub to track tasks, discuss ideas, and manage your workflow. This can help in maintaining a clear view of progress and priorities. | ||
|
||
7. **Add a License**: Choose and include an appropriate open-source license for your project, ensuring that the broader community understands how they can use and contribute to your work. | ||
|
||
8. **Create Contribution Guidelines**: Establish a CONTRIBUTING.md file with instructions for members on how to propose changes, submit issues, and contribute code. | ||
|
||
9. **Review and Merge Workflow**: Decide on a workflow for reviewing and merging changes. Will you use branch protection? Who will have merge privileges? Document this process to avoid confusion. | ||
|
||
10. **Establish Communication Channels**: Beyond GitHub, set up additional communication channels like Slack, Discord, or email lists for quick and informal discussions. | ||
|
||
Remember, the goal is to make your repository clear, accessible, and useful for all current and future members of your working group. Happy researching! |
Binary file not shown.
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,136 @@ | ||
FROM jupyter/r-notebook:hub-4.0.1 | ||
|
||
USER root | ||
|
||
# Set up package manager | ||
RUN apt-get install -y apt-transport-https && \ | ||
apt-get clean && apt-get update && apt-get install -y software-properties-common && \ | ||
add-apt-repository multiverse && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install some base software | ||
RUN apt-get update --yes && \ | ||
apt-get install --yes \ | ||
fonts-dejavu \ | ||
unixodbc \ | ||
unixodbc-dev \ | ||
r-base \ | ||
r-cran-rodbc && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Add sudo to jovyan user | ||
RUN apt update && \ | ||
apt install -y sudo && \ | ||
apt clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# This is where we can control which root permissions the jovyan user will have | ||
ARG PRIV_CMDS='/bin/ch*,/bin/cat,/bin/gunzip,/bin/tar,/bin/mkdir,/bin/ps,/bin/mv,/bin/cp,/usr/bin/apt*,/usr/bin/pip*,/bin/yum,/opt,/opt/conda/bin/*,/usr/bin/*' | ||
|
||
RUN usermod -aG sudo jovyan && \ | ||
echo "$LOCAL_USER ALL=NOPASSWD: $PRIV_CMDS" >> /etc/sudoers | ||
RUN addgroup jovyan | ||
RUN usermod -aG jovyan jovyan | ||
|
||
# Install RStudio | ||
RUN apt-get update && apt-get install --yes gdebi-core && \ | ||
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2023.09.1-494-amd64.deb && \ | ||
gdebi -n rstudio-server-2023.09.1-494-amd64.deb && \ | ||
rm rstudio-server-2023.09.1-494-amd64.deb && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Geospatial libraries | ||
RUN apt-get update && \ | ||
apt install -y \ | ||
gdal-bin \ | ||
lbzip2 \ | ||
libfftw3-dev \ | ||
libgdal-dev \ | ||
libgeos-dev \ | ||
libgsl0-dev \ | ||
libgl1-mesa-dev \ | ||
libglu1-mesa-dev \ | ||
libhdf4-alt-dev \ | ||
libhdf5-dev \ | ||
libjq-dev \ | ||
libpq-dev \ | ||
libproj-dev \ | ||
libprotobuf-dev \ | ||
libnetcdf-dev \ | ||
libsqlite3-dev \ | ||
libudunits2-dev \ | ||
lsb-release \ | ||
netcdf-bin \ | ||
postgis \ | ||
protobuf-compiler \ | ||
sqlite3 \ | ||
tk-dev \ | ||
libfmt-dev \ | ||
unixodbc-dev && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Fix RStudio / Conda openssl version mismatch | ||
RUN wget https://www.openssl.org/source/openssl-3.2.0.tar.gz && \ | ||
tar xfz openssl-3.2.0.tar.gz && \ | ||
mkdir openssl-build && cd openssl-build && \ | ||
../openssl-3.2.0/Configure --libdir=/lib/x86_64-linux-gnu/ && \ | ||
make && \ | ||
make install | ||
|
||
# Update permissions for /opt/conda | ||
RUN mkdir /usr/local/bin/start-notebook.d && \ | ||
chown -R jovyan:users /opt/conda/share /usr/local/share /usr/local/bin/start-notebook.d | ||
|
||
USER jovyan | ||
|
||
# Install jupyterlab and rstudio dependencies | ||
RUN conda install -c conda-forge \ | ||
jupyter_client \ | ||
jupyter_core \ | ||
jupyterlab_server \ | ||
jupyter_server \ | ||
r-rgl \ | ||
r-htmlwidgets \ | ||
r-htmltools && \ | ||
jupyter lab clean | ||
|
||
# reinstall R packages. Here is where you add any new R packages you would like to install | ||
RUN mamba install --quiet --yes \ | ||
r-base \ | ||
r-tidyverse \ | ||
r-terra \ | ||
r-future \ | ||
r-future.apply \ | ||
r-furrr \ | ||
&& \ | ||
mamba clean --all -f -y | ||
|
||
# Install Jupyter Lab Proxy extensions (cards in Launcher) | ||
RUN pip install jupyter-rsession-proxy jupyter-server-proxy jupyter-shiny-proxy jupyterlab-git | ||
|
||
# Install Mamba Gator package manager | ||
RUN rm -f ~/.jupyter/lab/workspaces/default* && \ | ||
mamba install -y -c conda-forge mamba_gator | ||
|
||
# Install and configure jupyter lab | ||
COPY jupyter_notebook_config.json /opt/conda/etc/jupyter/jupyter_notebook_config.json | ||
|
||
# Rebuild the Jupyter Lab with new tools | ||
RUN jupyter lab build | ||
|
||
# Build Conda environment. Any packages you would like to install with conda need to be added to the environment.yml file in this Dockerfiles directory | ||
RUN conda update -y conda && \ | ||
conda config --remove channels conda-forge && \ | ||
conda config --add channels conda-forge | ||
WORKDIR /home/jovyan | ||
COPY environment.yml /home/jovyan/ | ||
RUN mamba env create -f /home/jovyan/environment.yml | ||
RUN . /opt/conda/etc/profile.d/conda.sh && conda deactivate && conda activate custom && python -m ipykernel install --name custom && pip install jupyter_contrib_nbextensions | ||
|
||
# Install R packages from CRAN and GitHub | ||
RUN R -e "remotes::install_github('tomroh/ecoregions')" | ||
RUN R -e "install.packages('mblm', repos='http://cran.rstudio.com/')" | ||
|
||
# Set any required environment variables | ||
ENV PROJ_LIB=/opt/conda/envs/custom/share/proj | ||
RUN echo "PROJ_LIB=/opt/conda/envs/custom/share/proj" > /home/jovyan/.Renviron |
Oops, something went wrong.