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

Add Dockerfile for developing ROFL #2063

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jberci
Copy link
Contributor

@jberci jberci commented Nov 15, 2024

No description provided.

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for oasisprotocol-oasis-sdk failed.

Name Link
🔨 Latest commit 2f9396e
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-oasis-sdk/deploys/674f1967ceaca700081cd67a

@jberci jberci requested a review from matevz November 15, 2024 09:34
@jberci jberci marked this pull request as ready for review November 15, 2024 09:34
@jberci jberci force-pushed the jberci/feature/macos-docker branch from 0cf620f to 0554b1b Compare November 15, 2024 10:42
Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make another pass once Oasis CLI 0.10.3+ is released.

docs/rofl/prerequisites.md Show resolved Hide resolved
@matevz matevz added the blocked label Nov 15, 2024
the next section of this guide:

```bash
docker run --platform linux/amd64 --volume ./rofl-oracle:/src -it ghcr.io/oasisprotocol/rofl-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command could actually be expanded in the application.md chapter to include full build commands.

@@ -0,0 +1,9 @@
FROM ghcr.io/oasisprotocol/oasis-core-dev:stable-24.3.x AS oasis-core-dev

ARG OASIS_CLI_VERSION=0.10.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can install those by running:

```shell
sudo apt install musl-tools gcc-multilib clang
sudo apt install gcc-multilib clang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: when trying to run it in ubuntu docker (and devcontainer), it also required:

sudo apt update
sudo apt -y install pkg-config protobuf-compiler cmake

@jberci jberci force-pushed the jberci/feature/macos-docker branch 2 times, most recently from dfe9879 to 5ffd4cd Compare November 19, 2024 14:52
@matevz matevz removed the blocked label Nov 21, 2024
@jberci jberci force-pushed the jberci/feature/macos-docker branch from 5ffd4cd to 4e6fcc3 Compare November 25, 2024 16:46
@jberci jberci force-pushed the jberci/feature/macos-docker branch from 4e6fcc3 to 2f9396e Compare December 3, 2024 14:44
@CedarMist
Copy link
Member

I noticed I needed ENV RUSTFLAGS="-C target-feature=+aes,+ssse3" in the Dockerfile otherwise deoxysii failed to build, unless I specified it manually when building.

Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the issues. Otherwise lgtm. Merge oasisprotocol/docs#1042 first to unblock the CI.

```shell
oasis rofl build sgx --mode unsafe
```
2. Compile ROFL in the _unsafe_ mode. If you're using the `rofl-dev`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Compile ROFL in the _unsafe_ mode. If you're using the `rofl-dev`
2. Compile ROFL in the _unsafe_ mode. If you're using the [`rofl-dev`]

And somewhere at the end of the section:

[`rofl-dev`]: https://github.com/oasisprotocol/oasis-sdk/pkgs/container/rofl-dev

</TabItem>
<TabItem value="rofl-dev" label="Container">
```shell
docker run --platform linux/amd64 --volume ./rofl-oracle:/src -it ghcr.io/oasisprotocol/rofl-dev oasis rofl build sgx --mode unsafe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current path is the rofl-oracle root already.

Suggested change
docker run --platform linux/amd64 --volume ./rofl-oracle:/src -it ghcr.io/oasisprotocol/rofl-dev oasis rofl build sgx --mode unsafe
docker run --platform linux/amd64 --volume .:/src -it ghcr.io/oasisprotocol/rofl-dev oasis rofl build sgx --mode unsafe

Also change the docker command in the next step.

@@ -0,0 +1,11 @@
FROM ghcr.io/oasisprotocol/oasis-core-dev:stable-24.3.x AS oasis-core-dev

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #2063 (comment)

Suggested change
ENV RUSTFLAGS="-C target-feature=+aes,+ssse3"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^ Please test if this works. (remove .cargo folder and see if ROFL still compiles)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants