Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to ubuntu 22.04 #1939

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
branches:
- main
paths:
- '.github/workflows/**'
- '.github/workflows/CI.yml'
- '**.go'
- 'Makefile'
- 'go.**'
pull_request:
paths:
- '.github/workflows/**'
- '.github/workflows/CI.yml'
- '**.go'
- 'Makefile'
- 'go.**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
os: [macos-13, ubuntu-20.04]
os: [macos-13, ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Get gobin
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Forget copy-pasting Dockerfile instructions - use envd to easily build functions
envdlib = include("https://github.com/tensorchord/envdlib")

def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
envdlib.tensorboard(host_port=8888)
```

Expand Down Expand Up @@ -176,7 +176,7 @@ The build manifest `build.envd` looks like:

```python title=build.envd
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
# Configure the pip index if needed.
# config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages(name = [
Expand Down Expand Up @@ -227,7 +227,7 @@ Please edit the `build.envd` to enable jupyter notebook:

```python title=build.envd
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
# Configure the pip index if needed.
# config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages(name = [
Expand Down
2 changes: 1 addition & 1 deletion base-images/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ROOT_DIR=`dirname $0`

GIT_TAG_VERSION=$(git describe --tags --abbrev=0)
DOCKER_HUB_ORG="${DOCKER_HUB_ORG:-tensorchord}"
ENVD_OS="${ENVD_OS:-ubuntu20.04}"
ENVD_OS="${ENVD_OS:-ubuntu22.04}"
JULIA_VERSION="${JULIA_VERSION:-1.8rc1}"
RLANG_VERSION="${RLANG_VERSION:-4.2}"

Expand Down
2 changes: 1 addition & 1 deletion base-images/julia1.8rc1-ubuntu20.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG ENVD_VERSION
ARG ENVD_SSHD_IMAGE
FROM ubuntu:20.04 as base
FROM ubuntu:22.04 as base

FROM base as base-amd64

Expand Down
8 changes: 4 additions & 4 deletions base-images/remote-cache/build.envd
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")


def build_gpu_11_2():
"""tensorflow"""
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.cuda(version="11.2.2", cudnn="8")


def build_gpu_11_3():
"""pytorch"""
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.cuda(version="11.3.1", cudnn="8")


def build_gpu_11_6():
"""pytorch"""
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.cuda(version="11.6.2", cudnn="8")


Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/cli/testdata/build-test/build.envd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
2 changes: 1 addition & 1 deletion e2e/v0/cli/testdata/quick-start/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"numpy",
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/cli/testdata/up-test/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"via",
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/docs/testdata/complex/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deb https://mirror.sjtu.edu.cn/ubuntu focal-security main restricted universe mu
"ms-python.python",
]
)
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"numpy",
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/docs/testdata/envdlib/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ envdlib = include("https://github.com/tensorchord/envdlib")


def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
envdlib.tensorboard(host_port=8888)
2 changes: 1 addition & 1 deletion e2e/v0/docs/testdata/getting_started/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
# Configure pip index if needed.
# config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages(
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/docs/testdata/jupyter/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"numpy",
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/docs/testdata/minimal/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"via",
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/language/testdata/python/conda/build.envd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
def build():
install.conda_packages(env_file="env.yaml")
base(os="ubuntu20.04", language="python3.8")
base(os="ubuntu22.04", language="python3.8")
2 changes: 1 addition & 1 deletion e2e/v0/language/testdata/python/conda_channel/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ channels:
"""
)
install.conda_packages(env_file="env.yaml")
base(os="ubuntu20.04", language="python3.8")
base(os="ubuntu22.04", language="python3.8")
2 changes: 1 addition & 1 deletion e2e/v0/language/testdata/run/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
shell("zsh")
run(
commands=[
Expand Down
2 changes: 1 addition & 1 deletion e2e/v0/language/testdata/runtime/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.python_packages(
name=[
"numpy",
Expand Down
4 changes: 2 additions & 2 deletions envd/api/v0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def base(os: str, language: str, image: Optional[str]):
"""Set base image

Args:
os (str): The operating system (i.e. `ubuntu20.04`)
os (str): The operating system (i.e. `ubuntu22.04`)
language (str): The programming language dependency (i.e. `python3.8`)
image (Optional[str]): Custom image (i.e. `python:3.11-slim`)
"""
Expand Down Expand Up @@ -90,7 +90,7 @@ def include(git: str):
envd = include("https://github.com/tensorchord/envdlib")

def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
envd.tensorboard(8000)
```
"""
2 changes: 1 addition & 1 deletion envd/api/v0/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def julia_pkg_server(url: str):

def rstudio_server():
"""
Enable the RStudio Server (only work for `base(os="ubuntu20.04", language="r")`)
Enable the RStudio Server (only work for `base(os="ubuntu22.04", language="r")`)
"""


Expand Down
4 changes: 2 additions & 2 deletions envd/api/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"""


def base(image: str = "ubuntu:20.04", dev: bool = False):
def base(image: str = "ubuntu:22.04", dev: bool = False):
"""Set up the base env.

Args:
Expand Down Expand Up @@ -99,7 +99,7 @@ def include(git: str):
envd = include("https://github.com/tensorchord/envdlib")

def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
envd.tensorboard(host_port=8000)
```
"""
2 changes: 1 addition & 1 deletion envd/api/v1/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def julia_pkg_server(url: str):

def rstudio_server():
"""
Enable the RStudio Server (only work for `base(os="ubuntu20.04", language="r")`)
Enable the RStudio Server (only work for `base(os="ubuntu22.04", language="r")`)
"""


Expand Down
2 changes: 1 addition & 1 deletion envd/api/v1/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def cuda(version: str, cudnn: Optional[str] = "8"):

This will replace the default base image to an `nvidia/cuda` image. You can
also use a CUDA base image directly like
`base(image="nvidia/cuda:12.2.0-devel-ubuntu20.04", dev=True)`.
`base(image="nvidia/cuda:12.2.0-devel-ubuntu22.04", dev=True)`.

Args:
version (str): CUDA version, such as '11.6.2'
Expand Down
2 changes: 1 addition & 1 deletion examples/conda/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ custom_channels:
],
channel=["pytorch"],
)
base(os="ubuntu20.04", language="python3.8")
base(os="ubuntu22.04", language="python3.8")
install.python_packages(name=["flask"])
install.cuda(version="11.2.2", cudnn="8")
8 changes: 4 additions & 4 deletions examples/dgl/build.envd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def build():
# Use ubuntu20.04 as base image and install python
base(os="ubuntu20.04", language="python3")
# Use ubuntu22.04 as base image and install python
base(os="ubuntu22.04", language="python3")

# Add the packages you are using here
install.python_packages(["numpy", "dgl", "torch"])
Expand All @@ -13,8 +13,8 @@ def build():


def build_gpu():
# Use ubuntu20.04 as base image and install python
base(os="ubuntu20.04", language="python3")
# Use ubuntu22.04 as base image and install python
base(os="ubuntu22.04", language="python3")

# install cuda
install.cuda(version="11.2.2", cudnn="8")
Expand Down
2 changes: 1 addition & 1 deletion examples/download_files/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
io.http(
url="https://github.com/tensorchord/envd/releases/download/v0.2.0-alpha.18/envd-ssh_0.2.0-alpha.18_Linux_x86_64",
checksum="sha256:163fa5d9775a3666ec91e2422a794277cc8575147f15767d364cc40157888cfb",
Expand Down
2 changes: 1 addition & 1 deletion examples/dpgen2/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def install_kubectl_kind(env_name):


def build():
base(os="ubuntu20.04", language="python3.11")
base(os="ubuntu22.04", language="python3.11")
install.python_packages(
name=[
"pydflow",
Expand Down
2 changes: 1 addition & 1 deletion examples/ianvs/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3.6")
base(os="ubuntu22.04", language="python3.6")
shell("zsh")
install.apt_packages(name=["git", "libgl1-mesa-glx", "zip"])
run(
Expand Down
2 changes: 1 addition & 1 deletion examples/include_pkg/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ envdlib = include("https://github.com/tensorchord/envdlib")


def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
envdlib.tensorboard(8888)
2 changes: 1 addition & 1 deletion examples/julia-basic/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="julia")
base(os="ubuntu22.04", language="julia")
# config.julia_pkg_server(url="https://mirrors.tuna.tsinghua.edu.cn/julia")
install.julia_packages(["Example"])
shell("zsh")
2 changes: 1 addition & 1 deletion examples/llm-inference/build.envd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=v1
def build():
# base(os="ubuntu20.04", language="python3")
# base(os="ubuntu22.04", language="python3")
base(dev=True)
install.conda()
install.python()
Expand Down
2 changes: 1 addition & 1 deletion examples/mnist/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def base_env():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.vscode_extensions(
[
"ms-python.python",
Expand Down
2 changes: 1 addition & 1 deletion examples/python-basic/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
# config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages(
[
Expand Down
2 changes: 1 addition & 1 deletion examples/pytorch-profiler/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ envdlib = include("https://github.com/tensorchord/envdlib")


def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
shell("zsh")
install.cuda(version="11.2.2", cudnn="8")
install.python_packages(
Expand Down
2 changes: 1 addition & 1 deletion examples/r-basic/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="r")
base(os="ubuntu22.04", language="r")
install.r_packages(
[
"remotes",
Expand Down
2 changes: 1 addition & 1 deletion examples/stable-diffusion/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
# config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages(
[
Expand Down
2 changes: 1 addition & 1 deletion examples/streamlit-hello/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python")
base(os="ubuntu22.04", language="python")
configure_streamlit(8501)


Expand Down
4 changes: 2 additions & 2 deletions examples/streamlit-mnist/build.envd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def build():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
install.vscode_extensions(
[
"ms-python.python",
Expand All @@ -14,7 +14,7 @@ def build():


def serve():
base(os="ubuntu20.04", language="python3")
base(os="ubuntu22.04", language="python3")
configure_streamlit(8501)
configure_mnist()

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func startQuestion(input input) {
func generateFile(clicontext *cli.Context) error {
var buf bytes.Buffer
buf.WriteString("def build():\n")
buf.WriteString(fmt.Sprintf("%sbase(os=\"ubuntu20.04\", language=\"%s\")\n", indentation, selectionMap[LabelLanguage][0]))
buf.WriteString(fmt.Sprintf("%sbase(os=\"ubuntu22.04\", language=\"%s\")\n", indentation, selectionMap[LabelLanguage][0]))
buf.WriteString(generatePackagesStr("python", selectionMap[LabelPythonPackage]))
buf.WriteString(generatePackagesStr("r", selectionMap[LabelRPackage]))
if len(selectionMap[LabelPythonRequirement]) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/template/julia.envd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def build():
# Use ubuntu20.04 as base image and install julia
base(os="ubuntu20.04", language="julia")
# Use ubuntu22.04 as base image and install julia
base(os="ubuntu22.04", language="julia")
# Uncomment line below to enable Pypi mirror
# config.julia_pkg_server(url="https://mirrors.tuna.tsinghua.edu.cn/julia")

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/template/r.envd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def build():
# Use ubuntu20.04 as base image and install r
base(os="ubuntu20.04", language="r")
# Use ubuntu22.04 as base image and install r
base(os="ubuntu22.04", language="r")

# Add the packages you are using here
install.r_packages(
Expand Down
Loading
Loading