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

docker devnet -- M1 compatibility and lotus update #1084

Closed
LaurenSpiegel opened this issue Jan 16, 2023 · 11 comments
Closed

docker devnet -- M1 compatibility and lotus update #1084

LaurenSpiegel opened this issue Jan 16, 2023 · 11 comments
Labels
area/dev-ux Developer experience improvements kind/bug Kind: Bug

Comments

@LaurenSpiegel
Copy link
Collaborator

@airenas and @nonsense , would appreciate your input on these:

  1. Lotus's dockerfile has been updated. Is there anything we should do in our setup? See _ci_ Build docker containers automatically for butterflynet, calibnet, and debug lotus#9625

  2. @hannahhoward was unable to get the docker to build on an M1 mac with either the make docker/all command or the make docker/all ffi_from_source=1

Error:
unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-6421404651457840.rlib" "-Wl,-Bdynamic" "-lhwloc" "-lOpenCL" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/local/rustup/toolchains/nightly-2022-05-09-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/opt/filecoin/extern/filecoin-ffi/rust/target/debug/deps/filcrypto-bdd4d906adefd5ff" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
#12 445.0 = note: collect2: fatal error: ld terminated with signal 9 [Killed]
#12 445.0 compilation terminated.
#12 445.0
#12 445.0
#12 445.3 error: could not compile filcrypto due to previous error
#12 445.7 + rm -f /tmp/tmp.wqNf8h8H48
#12 445.7 make[1]: *** [Makefile:14: .install-filcrypto] Error 101
#12 445.8 make[1]: Leaving directory '/opt/filecoin/extern/filecoin-ffi'
#12 445.8 make: *** [Makefile:41: build/.filecoin-install] Error 2

@jacobheun jacobheun added this to Boost Jan 16, 2023
@jacobheun jacobheun added area/dev-ux Developer experience improvements kind/bug Kind: Bug labels Jan 17, 2023
@jacobheun
Copy link
Contributor

Yeah we need to update our setup, Lotus has consolidated some images so we need to update for that.

@jacobheun
Copy link
Contributor

Looks like there's an issue with M1s in the latest lotus setup filecoin-project/lotus#9821

@airenas
Copy link
Contributor

airenas commented Jan 17, 2023

  1. Lotus's dockerfile has been updated. Is there anything we should do in our setup? See
  1. I think we could use official filecoin/lotus-all-in-one:master-debug image instead of building lotus locally. It would spread the make docker/all. But as @jacobheun pointed there is no official image for arm in dockerhub
  2. If 1 is not possible then we should use a new lotus dockerfile as https://github.com/filecoin-project/lotus/blob/master/Dockerfile.lotus is deprecated

@airenas
Copy link
Contributor

airenas commented Jan 17, 2023

2. @hannahhoward was unable to get the docker to build on an M1 mac with either the make docker/all command or the make docker/all ffi_from_source=1

It does not relate to lotus docker updates, as the Lotus Team has kept the old file we are using. From the info you pasted I see that the part of building filecoin-fii is failing with a termination error. I would guess that docker process on the @hannahhoward's machine runs out of memory, could it be?

@jacobheun
Copy link
Contributor

@airenas if you have bandwidth to try updating to the new lotus image that would be great. I think we can do a followup as needed once lotus as support for arm in the new builds.

@airenas
Copy link
Contributor

airenas commented Jan 18, 2023

@LaurenSpiegel has asked me to confirm if devnet works on M1. I am confirming - it does.
Chip: Apple M1, macOS: 12.5.1
Boost version: 5c2f301
Build command: make docker/all ffi_from_source=1, by default it uses lotus 1.19.0-rc1 (tested also with 1.19.0).
Started devnet, made a deal, and retrieved a file.

Regarding the error: I did the test. I limited RAM to 3GB, Swap to 512 Mb on Mac's Docker Desktop/Settings/Resources/Advanced tab and got exactly the same error as noted in #1084 (comment). So the reported error is related to the machine state/settings and not our docker configuration issue.

@LaurenSpiegel
Copy link
Collaborator Author

@airenas , thank you. Will you please make a PR to the readme with recommended resource settings a user should have in Docker Desktop/Settings/Resources/Advanced?

@airenas
Copy link
Contributor

airenas commented Jan 19, 2023

Will you please make a PR to the readme with recommended resource settings a user should have in Docker Desktop/Settings/Resources/Advanced?

The default setup just worked fine for me. So I would say, we don't need a place for it in the readme. Don't you think that this issue is enough?

@LaurenSpiegel
Copy link
Collaborator Author

I think it would be helpful to add a one-liner. Will leave this ticket open for the lotus miner update.

@LaurenSpiegel
Copy link
Collaborator Author

@airenas, reminder on this. any issue with the lotus miner update?

airenas added a commit to airenas/boost that referenced this issue Feb 3, 2023
@airenas
Copy link
Contributor

airenas commented Feb 3, 2023

Thanks for the hit. I tested the official lotus image from Dockerhub. The image with debug option works out of the box. I updated Makefile to use it by default: #1157.

jacobheun pushed a commit that referenced this issue Feb 15, 2023
* Use an official lotus image for docker devnet

Implemented as requested in  (#1084)

* Fix tabs
@github-project-automation github-project-automation bot moved this to Done in Boost Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ux Developer experience improvements kind/bug Kind: Bug
Projects
Status: Done
Development

No branches or pull requests

4 participants