Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens authored Oct 18, 2024
0 parents commit 04db464
Show file tree
Hide file tree
Showing 16 changed files with 1,123 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# docs and unit tests
^\.github$
^_pkgdown\.yml$
^pkgdown$
^docs$
^analysis$
^manuscript$
^data-raw$
^vignettes_add$

# R-markdown files in the root folder.
^LICENSE.*$
^CONDUCT\.md$
^NEWS\.md$
^README\.md$
^contact\.md$
^cran-comments\.md$
^review-notes\.md$

# R Stuff
^.*\.Rproj$
^.*\.Renviron$
^\.Rproj\.user$
^\.httr-oauth$
^.*-logo\..*$
^codemeta\.json$
51 changes: 51 additions & 0 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

# set write permissions
# to create gh-pages
permissions:
contents: write

jobs:
pkgdown:
runs-on: Ubuntu-latest
timeout-minutes: 20
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
extra-packages: any::pkgdown, any::devtools, local::.
needs: website

- name: Build site
run: devtools::install_github("khufkens/bgtemplate"); pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# History files
.Rhistory
.Rapp.history

# Session Data files
.RData

# 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
16 changes: 16 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Package: RTemplate
Title: Your project
Version: 0.1
Authors@R:
person(
given = "X",
family = "Y",
email = "[email protected]",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0000-0000-0000")
)
Description: What the package does (one paragraph).
License: AGPL-3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
29 changes: 29 additions & 0 deletions Dockerfile_torch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM rocker/cuda:4.3.1

LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.source="https://github.com/rocker-org/rocker-versioned2" \
org.opencontainers.image.vendor="Rocker Project" \
org.opencontainers.image.authors="Carl Boettiger <[email protected]>"

ENV S6_VERSION=v2.1.0.2
ENV RSTUDIO_VERSION=2023.09.0+463
ENV DEFAULT_USER=rstudio
ENV PANDOC_VERSION=default
ENV QUARTO_VERSION=default

RUN /rocker_scripts/install_rstudio.sh
RUN /rocker_scripts/install_pandoc.sh
RUN /rocker_scripts/install_quarto.sh
RUN /rocker_scripts/install_tidyverse.sh

RUN apt update && apt install -y libprotobuf-dev libmagick++-dev libavfilter-dev

RUN R -e "install.packages( \
c('torch', 'luz', 'torchvision', 'torchaudio','rsample'), \
dependencies = TRUE, \
repos='http://cran.rstudio.com/')"
RUN R -e "Sys.setenv(CUDA='11.7'); torch::install_torch(); quit('no')"

EXPOSE 8787

CMD ["/init"]
Loading

0 comments on commit 04db464

Please sign in to comment.