Skip to content

Commit

Permalink
devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed Mar 15, 2024
1 parent 653c61e commit 2635e82
Show file tree
Hide file tree
Showing 9 changed files with 1,622 additions and 60 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"github.vscode-github-actions",
"ms-toolsai.jupyter",
"tamasfe.even-better-toml",
"julialang.language-julia"
]
}
},
"onCreateCommand": "bash .devcontainer/onCreate.sh"
}
2 changes: 2 additions & 0 deletions .devcontainer/julia_startup.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV["JULIA_PKG_USE_CLI_GIT"] = true
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager"
10 changes: 10 additions & 0 deletions .devcontainer/onCreate.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Pkg

Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/cossio/CossioJuliaRegistry.git"))
Pkg.Registry.add("General")

Pkg.add([
"Revise",
"Makie",
"CairoMakie"
])
9 changes: 9 additions & 0 deletions .devcontainer/onCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# install Julia
curl -fsSL https://install.julialang.org | sh -s -- --yes

# Julia startup file
mkdir -p ~/.julia/config
cp .devcontainer/julia_startup.jl ~/.julia/config/startup.jl

# Install Julia packages, registries, ...
/home/vscode/.juliaup/bin/julia .devcontainer/onCreate.jl
28 changes: 7 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
# Files generated by invoking Julia with --code-coverage
*.jl.cov
.DS_Store
.vscode/
.CondaPkg/
*.jl.*.cov

# Files generated by invoking Julia with --track-allocation
*.jl.cov
*.jl.mem

# System-specific files and directories generated by the BinaryProvider and BinDeps packages
# They contain absolute paths specific to the host computer, and so should not be committed
deps/deps.jl
deps/build.log
deps/deps.jl
deps/downloads/
deps/usr/
deps/src/

# Build artifacts for creating documentation generated by the Documenter package
deps/usr/
docs/build/
docs/site/

# File generated by Pkg, the package manager, based on a corresponding Project.toml
# It records a fixed state of all packages used by the project. As such, it should not be
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

.DS_Store
.vscode/
docs/site/
Loading

0 comments on commit 2635e82

Please sign in to comment.