Skip to content

Commit

Permalink
docs: update required docker version, add docker version check
Browse files Browse the repository at this point in the history
This updates the required Docker version for using `openlane --dockerized` to a tested version, and adds a check in `container.py` to verify that the user has the correct version.

Also, a number of typos were fixed, and the DetSys Nix installer now points at the main version again instead of a PR (now that the PR has been merged.)
  • Loading branch information
donn committed Feb 16, 2025
1 parent 09e84c1 commit 04dc5a8
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 28 deletions.
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+
* 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.
* Docker v27.3.1+
* Docker post-installation steps for running without root.
* Git v2.35+
* Python v3.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 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
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
};

inputs = {
nix-eda.url = github:efabless/nix-eda/2.1.2;
libparse.url = github:efabless/libparse-python;
ioplace-parser.url = github:efabless/ioplace_parser;
volare.url = github:efabless/volare;
devshell.url = github:numtide/devshell;
nix-eda.url = "github:efabless/nix-eda/2.1.2";
libparse.url = "github:efabless/libparse-python";
ioplace-parser.url = "github:efabless/ioplace_parser";
volare.url = "github:efabless/volare";
devshell.url = "github:numtide/devshell";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
};

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, "27.3.1") < 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
28 changes: 20 additions & 8 deletions 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

0 comments on commit 04dc5a8

Please sign in to comment.