Skip to content

Commit

Permalink
README.md: Add docker revision modification example
Browse files Browse the repository at this point in the history
Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn committed Jul 31, 2024
1 parent e16b82f commit 7d678c2
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ In order to use `orfs_flow()` macro in Bazel Workspace in other project it is re
git_override(
module_name = "bazel-orfs",
remote = "<URL to bazel-orfs repository>",
commit = "<git hash for specific bazel-orfs revision>"
commit = "<git hash for specific bazel-orfs revision>",
)
```

Expand All @@ -108,7 +108,8 @@ In order to use `orfs_flow()` macro in Bazel Workspace in other project it is re
```starlark
bazel_dep(name = "bazel-orfs")
local_path_override(
module_name = "bazel-orfs", path = "<path to local bazel-orfs workspace>"
module_name = "bazel-orfs",
path = "<path to local bazel-orfs workspace>",
)
```

Expand Down Expand Up @@ -184,8 +185,18 @@ These are the genrules spawned in this macro:
Regular Bazel flow uses artifacts from the Docker environment with preinstalled ORFS to run the Physical Design Flow.

It implicitly depends on a Docker image with ORFS environment pre-installed being present.
The Docker image used in the flow is defined in the [module](./MODULE.bazel) file, the default can be overridden by specifying modified `image` and `sha256` attributes.
Setting this attribute to a valid image and checksum will enable Docker to automatically pull the image.
The Docker image used in the flow is defined in the [module](./MODULE.bazel) file, the default can be overridden by specifying `image` and `sha256` attributes:

```starlark
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
orfs.default(
image = <image>,
sha256 = <sha256>,
)
use_repo(orfs, "docker_orfs")
```

Setting this attribute to a valid image and checksum will enable Bazel to automatically pull the image and extract ORFS artifacts.

```bash
bazel run @bazel-orfs//:<target>_<stage> -- <absolute_path>
Expand Down

0 comments on commit 7d678c2

Please sign in to comment.