- Install Docker Desktop. I strongly recommend using it on WSL2 (Windows Subsystem for Linux 2) if you are using Windows.
- Install VSCode and Remote-Containers Extension
- Create Docker volumes by running
docker volume create cache docker volume create TinyTeX docker volume create fonts
I will introduce the workflow when starting a project using this template and when working. The administrator creates a project using this template, and the collaborators clone the project and work on it.
- Create Docker Volumes. (Only for the first time using this template)
docker volume create cache
docker volume create TinyTeX
docker volume create fonts
- Create a new repository from this template on GitHub and clone it to your local computer
- Open this repository in VSCode. (Remote Containers)
- Create an R project. If you use Rstudio, access
localhost:8787
and create a project. - Start package management with
renv::init()
- Install DVC with
pip install dvc dvc-gdrive
. This command is not required after the second time because of the pip cache - Set up the DVC environment
- Create a folder on Google Drive and copy its ID
- Run
dvc init && dvc remote add -d myremote gdrive://<Google Drive folder ID>
- Share the Google Drive folder with the collaborators (as a normal Google Drive folder)
- Set up VSCode settings for LaTeX
- For the first time, run
tinytex::install_tinytex(dir = "/home/rstudio/.TinyTeX", force = TRUE)
- Copy
.vscode/_settings.json
to.vscode/settings.json
- For the first time, run
- Set up Julia environment. Create an empty
Project.toml
file and activate it withPkg.activate()
.
- Create Docker Volumes. (Only for the first time using this template)
- Clone the repository created by the administrator on GitHub
- Open this repository in VSCode. (Remote Containers)
- Open the R project. (If you use Rstudio, access
localhost:8787
and open the project.) - Install the R packages with
renv::restore()
- Install Python packages (including DVC) with
pip install -r requirements.txt
- Download the data with
dvc pull
- Set up VSCode settings for LaTeX
- For the first time, run
tinytex::install_tinytex(dir = "/home/rstudio/.TinyTeX", force = TRUE)
- Copy
.vscode/_settings.json
to.vscode/settings.json
- For the first time, run
- Install Julia packages with
Pkg.activate(); Pkg.instantiate()
- When you add an R package, record it with
renv::snapshot()
- When you add a Julia package, add it with
Pkg.add("Package Name")
. It will be automatically recorded inProject.toml
- When you add a Python package, add it with
pip install Package Name
and record it withpip freeze > requirements.txt
- When you add data with DVC, add it with
dvc add
. Usually, just add the directory withdvc add data/
- After the above work,
git add
,git commit
, andgit push
- When you finish the work, upload the data with
dvc push