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

docs: update required docker version, add docker version check #666

Merged
merged 5 commits into from
Feb 18, 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
12 changes: 12 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
## Documentation
-->

# 2.3.7

## Tool Updates

* Updated Docker requirement to tested version: 27.3.1
* Added warning when Docker version is out of date.

## Documentation

* Updated documentation to reflect tested Docker version.
* Updated documentation to stop using a branch of the DetSys Nix Installer.

# 2.3.6

## Steps
Expand Down
4 changes: 3 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
yosysFull,
# Python
buildPythonPackage,
poetry-core,
click,
cloup,
pyyaml,
Expand All @@ -50,7 +51,7 @@
pyfakefs,
rapidfuzz,
ioplace-parser,
poetry-core,
semver,
}: let
yosys-env = (yosys.withPythonPackages.override {target = yosysFull;}) (ps:
with ps; [
Expand Down Expand Up @@ -107,6 +108,7 @@
klayout.pymod
rapidfuzz
ioplace-parser
semver
]
++ self.includedTools;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Successful outputs will look like this:

```
$ docker --version
Docker version 20.10.16, build aa7e414fdc
Docker version 27.3.1, build ce12230
$ python3 --version
Python 3.10.5
$ python3 -m pip --version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Docker-based Installation

For ease of installation, OpenLane offers the ability to transparently [Docker](<https://en.wikipedia.org/wiki/Docker_(software)>) containers.
For ease of installation, OpenLane offers the ability to transparently use
[Docker](<https://en.wikipedia.org/wiki/Docker_(software)>) containers to run
your flow.

These containers include OpenLane's applications, binaries as well as all other required dependencies.
These containers include OpenLane's binaries, scripts as well as any other
dependencies.

```{toctree}
:glob:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

For OpenLane you need a couple of tools installed:

* Docker 19.03.12+
* Docker post-installation steps for running without root
* Git 2.35+
* Docker version 25.0.5+
* Docker post-installation steps for running without root.
* Git version 2.35+
* Python 3.8+ with pip and tkinter

Please install all of these dependencies using your package manager. Please note that while alternative container services such as podman do work, they are not officially supported.
Please install all of these dependencies using your package manager. Please note
that while alternative container services such as podman do work, they are not
officially supported and are best-effort.

### Installing Docker

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ sudo apt-get install -y curl
After that, simply run this command:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Simply run this (entire) command in `Terminal.app`:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $ sudo apt-get install -y curl
Then install Nix by running the following command:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
9 changes: 5 additions & 4 deletions openlane/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,11 @@ def cli_in_container(
other_mounts=docker_mounts,
tty=docker_tty,
)
except ValueError as e:
print(e)
except Exception:
traceback.print_exc()
except Exception as e:
err(e)
ctx.exit(1)

ctx.exit(0)


o = partial(option, show_default=True)
Expand Down
14 changes: 13 additions & 1 deletion openlane/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
import os
import re
import uuid
import httpx
import shlex
import pathlib
import tempfile
import subprocess
from typing import List, NoReturn, Sequence, Optional, Union, Tuple

import httpx
import semver

from .common import mkdirp
from .logging import err, info, warn
from .env_info import OSInfo
Expand Down Expand Up @@ -170,6 +172,16 @@ def run_in_container(
if osinfo.container_info is None:
raise FileNotFoundError("No compatible container engine found.")

if osinfo.container_info.engine.lower() == "docker":
if semver.compare(osinfo.container_info.version, "25.0.5") < 0:
warn(
f"Your Docker engine version ({osinfo.container_info.version}) is out of date. You may encounter unexpected issues."
)
else:
warn(
f"Unsupported container engine '{osinfo.container_info.engine}'. You may encounter unexpected issues."
)

if not ensure_image(image):
raise ValueError(f"Failed to use image '{image}'.")

Expand Down
14 changes: 13 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlane"
version = "2.3.6"
version = "2.3.7"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <donn@efabless.com>"]
readme = "Readme.md"
Expand All @@ -26,6 +26,7 @@ klayout = ">=0.29.0,<0.30.0"
rapidfuzz = ">=3.9.0,<4"
ioplace-parser = ">=0.3.0,<0.5.0"
yamlcore = "^0.0.2"
semver = "^3.0.2"


[tool.poetry.group.dev.dependencies]
Expand Down
Loading