Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: gpu support for rp Dockerfile #299

Merged
merged 2 commits into from
Aug 26, 2024
Merged

fix: gpu support for rp Dockerfile #299

merged 2 commits into from
Aug 26, 2024

Conversation

walkah
Copy link
Collaborator

@walkah walkah commented Aug 22, 2024

Review Type Requested (choose one):

  • Logic - thorough check (from everybody doing review)

Summary

Our published docker image didn't support nvidia gpus for the PoW calculations. This update modifies the Dockerfile to have a COMPUTE_MODE build arg that allows gpu or cpu (with gpu as the default). For non-gpu machines (local dev, integration tests) it uses cpu in the docker-compose.dev.yml file.

Task/Issue reference

Closes: https://github.com/Lilypad-Tech/internal/issues/199

noryev

This comment was marked as duplicate.

Copy link
Contributor

@noryev noryev left a comment

Choose a reason for hiding this comment

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

lgtm

FROM base AS build-gpu
RUN nvcc --version && nvcc --ptx -o ./pkg/resourceprovider/cudaminer/keccak.ptx ./pkg/resourceprovider/cudaminer/keccak.cu
RUN go build -v --tags cuda
ENV DISABLE_POW=false
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we need to set the DISABLE_POW here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This gets passed to lilypad resource-provider as --disable-pow (we disable pow for CPU ... i.e. local dev / integration tests)

@walkah walkah merged commit d830232 into main Aug 26, 2024
2 checks passed
@walkah walkah deleted the walkah/fix-rp-docker-gpu branch August 26, 2024 17:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants