Skip to content

Add NVIDIA runtime support & WebUI port to docker-compose.yml - #555

Open
B0bbyDowns wants to merge 2 commits into
Lilypad-Tech:mainfrom
B0bbyDowns:my-feature-branch
Open

Add NVIDIA runtime support & WebUI port to docker-compose.yml#555
B0bbyDowns wants to merge 2 commits into
Lilypad-Tech:mainfrom
B0bbyDowns:my-feature-branch

Conversation

@B0bbyDowns

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Expose port 8438 in Bacalhau container to enable the Web UI
  • Enable --config WebUI.Enabled in Bacalhau command
  • Add runtime: nvidia and NVIDIA_VISIBLE_DEVICES=all to both Bacalhau and Resource Provider services
  • Remove GPU reservations in favor of explicitly specifying the NVIDIA runtime
  • Retain original watchtower service and volume mappings

Detailed Description

This PR updates the docker-compose.yml to allow GPU support through the NVIDIA runtime and enable the Bacalhau Web UI port. The changes include:

  1. GPU Support

    • Added runtime: nvidia to both the bacalhau and resource-provider services.
    • Set the environment variable NVIDIA_VISIBLE_DEVICES=all for GPU recognition in containers.
  2. Web UI

    • Exposed Bacalhau Web UI port (8438:8438) and included --config WebUI.Enabled in the Bacalhau command.
  3. Other Adjustments

    • Removed explicit GPU device reservation in resource-provider in favor of NVIDIA runtime.
    • Maintained watchtower service as is.

Files Changed

  • docker-compose.yml
# This is a docker-compose file for use by Resource Providers
 services:
   bacalhau:
     image: ghcr.io/lilypad-tech/bacalhau:latest
     container_name: bacalhau
+    ports:
+      - "8438:8438"
+    command: ["bacalhau", "serve", "--orchestrator", "--compute", "--config", "WebUI.Enabled"]
+    runtime: nvidia
     restart: unless-stopped
     privileged: true
     build:
       context: ..
       dockerfile: ./docker/bacalhau/Dockerfile
     environment:
       - BACALHAU_ENVIRONMENT=local
+      - NVIDIA_VISIBLE_DEVICES=all
     volumes:
       - bacalhau-data:/root/.bacalhau

   resource-provider:
     image: ghcr.io/lilypad-tech/resource-provider:latest
     container_name: resource-provider
+    runtime: nvidia
     restart: unless-stopped
     depends_on:
       bacalhau:
         condition: service_healthy
     build:
       context: ..
       dockerfile: ./docker/resource-provider/Dockerfile
       args:
         - COMPUTE_MODE=gpu
     volumes:
       - lilypad-data:/tmp/lilypad/data
       - bacalhau-data:/root/.bacalhau
     environment:
       - WEB3_PRIVATE_KEY
+      - NVIDIA_VISIBLE_DEVICES=all
       - WEB3_RPC_URL
       - BACALHAU_API_HOST=bacalhau
       - BACALHAU_NODE_CLIENTAPI_HOST=bacalhau
       - BACALHAU_NODE_CLIENTAPI_PORT=1234

   watchtower:
     image: containrrr/watchtower
     container_name: watchtower
     restart: always
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock

 volumes:
   bacalhau-data:
   lilypad-data:

Testing

  1. Local Testing

    • Run docker-compose up -d with the updated file.
    • Confirm containers start without errors.
    • Access the Bacalhau Web UI on http://localhost:8438.
  2. GPU Check

    • Run an internal GPU job on Bacalhau or test GPU usage inside the container to confirm GPU support.

Additional Notes

  • If you notice any issues with GPU detection, ensure you have the correct NVIDIA drivers installed and Docker configured for nvidia-container-runtime.

@B0bbyDowns
B0bbyDowns requested a review from a team as a code owner March 27, 2025 00:53
@cla-bot

cla-bot Bot commented Mar 27, 2025

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: root.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@B0bbyDowns B0bbyDowns closed this Mar 27, 2025
@B0bbyDowns B0bbyDowns reopened this Mar 27, 2025
@bgins

bgins commented Mar 27, 2025

Copy link
Copy Markdown
Contributor

Hey @B0bbyDowns! Thanks for the pull request. ❤️

There are a few preliminaries for contributing to the project. Could you check your git configuration per this @cla-bot message: #555 (comment)

It looks like you'll need to set up git signing. We have some documentation to help out with that here: https://github.com/Lilypad-Tech/lilypad/blob/main/CONTRIBUTING.md#signed-commits. Once that's set up, you'll need to retroactively sign the commits on this PR. Fortunately, it's just one commit, so a git commit --amend with no changes will likely work.

Lastly, contributors need to sign the CLA. If you could do that on a separate pull request like this one: https://github.com/Lilypad-Tech/lilypad/pull/499/files, that should get you set up.

@B0bbyDowns

B0bbyDowns commented Mar 27, 2025 via email

Copy link
Copy Markdown
Contributor Author

@cla-bot

cla-bot Bot commented Mar 28, 2025

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: root.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot

cla-bot Bot commented Mar 28, 2025

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: root.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot

cla-bot Bot commented Mar 28, 2025

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @B0bbyDowns on file. In order for us to review and merge your code, please open a new pull request and sign the Contributor License Agreement following the instructions in our contributing guide. Once the pull request is merged, ping a maintainer who will summon me again.

@B0bbyDowns

B0bbyDowns commented Mar 28, 2025 via email

Copy link
Copy Markdown
Contributor Author

@bgins

bgins commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Mar 28, 2025
@cla-bot

cla-bot Bot commented Mar 28, 2025

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@bgins

bgins commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

Thanks @B0bbyDowns, the preliminaries all look correct. We'll get someone to take a look at the PR today or early next week.

@bgins
bgins requested a review from logan-wrld April 22, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants