Skip to content

Building a Julia Environment

This guide covers configuring Julia environments in envd. If you’re new to envd please read our Tutorial and build configuration guides first.

Specifying Julia

First, you can specify to use the Julia language in the base function.

python
def build():
    base(os="ubuntu20.04", language="julia")

Julia packages

You can install Julia packages with install.julia_packages function. The following example installs Example:

python
def build():
    base(os="ubuntu20.04", language="julia")
    install.julia_packages(name = [
        "Example",
    ])

Configure Julia package server

By default, the Julia package server "pkg.julialang.org" is used when downloading and installing Julia packages. However, you can specify any other servers via config.julia_pkg_server() like the following:

python
def build():
    base(os="ubuntu20.04", language="julia")
    config.julia_pkg_server(url="https://mirrors.tuna.tsinghua.edu.cn/julia")
    install.julia_packages(name = [
        "Example",
    ])

Specifying shell program

You can specify shell program used in the environment with shell function. The following example uses zsh:

python
def build():
    base(os="ubuntu20.04", language="julia")
    shell("zsh")

Specifying VSCode extensions

You can specify VSCode extensions with install.vscode_extensions function. The following example installs julialang.language-julia[1]:

python
def build():
    base(os="ubuntu20.04", language="julia")
    install.vscode_extensions(["julialang.language-julia"])

  1. open-vsx is used instead of Microsoft VSCode Marketplace due to licensing issues. ↩︎

Released under the Apache-2.0 License. Built with VitePress.