-
Notifications
You must be signed in to change notification settings - Fork 60
/
build.envd
40 lines (32 loc) · 979 Bytes
/
build.envd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# syntax=v1
# You can install envd with pip: `pip install envd`.
# Make sure you already have docker installed.
# To start the development of mosec, just run `envd up`, then you will get an
# isolated and clean Python & Rust development environment.
# To access GPU, you can run `envd up :gpu`. Make sure you have nvidia-docker
# installed.
def rust():
"""Install Rust."""
install.apt_packages(name=["build-essential"])
run(
[
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
]
)
runtime.environ(extra_path=["/home/envd/.cargo/bin"])
def jax():
install.python_packages(
name=[
"jax[cuda] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html",
"chex",
]
)
def build():
base(dev=True)
install.conda()
install.python()
rust()
runtime.init(["make install"])
def gpu():
build()
install.cuda(version="11.6.2")