This template repository creates a starter development container setup suitable for use in the department research computing server.
To create your setup, follow these steps:
-
Enter the following command to generate your project starter code:
copier copy gh:UCSB-PSTAT/devcontainer-template <name-of-project-directory>
where
<name-of-project-directory>
is the name of the directory you wish to save your project files to. The output would look similar to the following for a project calledmy-awesome-project
:$> copier copy gh:UCSB-PSTAT/devcontainer-template my-awesome-project-folder 🎤 What is the name of your project? (Must be unique and use lowercase, dashes -, underscores _ ONLY) my-awesome-project 🎤 What language(s) will you use in this project? R and Python 🎤 Do you want to install Visual Studio Code extensions for Jupyter notebooks using R and Python? Yes 🎤 Install RStudio Server? This is optional if using VS Code and R extensions for development. No 🎤 Install Quarto? Quarto is optional publishing system compatible with R and Python. No 🎤 Do you want to include example files? Yes Copying from template version 1.4.2 create . create README.md create example.Rmd create .devcontainer create .devcontainer/Dockerfile create .devcontainer/devcontainer.json
-
View generated files:
tree -a <name-of-project>
The output would look similar to the follwing:
$> tree -a my-awesome-project-folder starter-code/ ├── .devcontainer │ ├── devcontainer.json │ └── Dockerfile ├── example.Rmd └── README.md 1 directory, 4 files
-
Use generated files:
- Upload
my-awesome-project-folder
to a GitHub repository to start a new repository for your project. - Create and download a zip file to manually add
.devcontainer
directory and its contents to an existing project.
- Upload
- Authenticate with your GitHub account:
gh auth login
- Convert generated files to a repository:
cd /home/jovyan/work/ git init git add * git commit -m "first commit" git branch -M main
- Upload local repository to a new GitHub repository.
Be sure to choose, "Push an existing local repository to GitHub":cd /home/jovyan/work/ gh repo create
- Create a zip file of
starter-code
contents:zip -r my-awesome-project.zip my-awesome-project-folder
- Click on Jupyter logo to open Jupyter Lab.
- Download the zipfile,
my-awesome-project.zip
- Once downloaded, unzip the contents and add the
.devcontainer
folder to the root of your project folder.