Skip to content

NVIDIA Image support for pgml #670

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

Closed
wants to merge 1 commit into from

Conversation

jsaied99
Copy link
Contributor

@jsaied99 jsaied99 commented Jun 1, 2023

Adding Baseline NVIDIA Image for PostgresML. Solving issue.

@jsaied99 jsaied99 marked this pull request as ready for review June 1, 2023 15:09
@montanalow montanalow requested a review from levkk June 1, 2023 15:33
@levkk
Copy link
Contributor

levkk commented Jun 1, 2023

I'm still getting this:

pgml_development=# SELECT pgml.embed('intfloat/e5-small', 'hi mom');
pgml_development=# SELECT pgml.embed('intfloat/e5-small', 'hi mom', '{"device": "cuda"}');
ERROR:  called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'RuntimeError'>, value: RuntimeError('Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx'), traceback: Some(<traceback object at 0x7ff503fca800>) }
pgml_development=#
nvidia-smi
Thu Jun  1 09:46:09 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02              Driver Version: 530.30.02    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3070 Ti      On | 00000000:08:00.0 Off |                  N/A |
|  0%   46C    P5               34W / 290W|   1044MiB /  8192MiB |     23%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

@jsaied99
Copy link
Contributor Author

jsaied99 commented Jun 1, 2023

Are you passing the --gpus flag? Or if you are using compose, you can try this:

deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [ gpu ]

@levkk
Copy link
Contributor

levkk commented Jun 1, 2023

 docker-compose up
Starting postgresml_docs_1       ... done
Recreating postgresml_postgres_1 ... error

ERROR: for postgresml_postgres_1  Cannot start service postgres: could not select device driver "nvidia" with capabilities: [[gpu]]

version: "3"
services:
  postgres:
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [ gpu ]
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready" ]
      interval: 1s
      timeout: 5s
      retries: 100
    build:
      context: ./pgml-extension/
      dockerfile: Dockerfile.local
    ports:
      - "5433:5432"
    command:
      - sleep
      - infinity
  dashboard:
    depends_on:
       postgres:
         condition: service_healthy
    build:
      context: ./pgml-dashboard/
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    environment:
      ROCKET_ADDRESS: 0.0.0.0
      DATABASE_URL: postgres://postgres:postgres@postgres:5432/pgml_development
    command: bash -c "sqlx migrate run && cargo run"
  docs:
    build:
      context: ./pgml-docs/
      dockerfile: Dockerfile
    ports:
      - "8001:8001"
    command:
      - mkdocs
      - serve
      - -a 0.0.0.0:8001

@jsaied99
Copy link
Contributor Author

jsaied99 commented Jun 1, 2023

Do you have the nvidia container toolkit? NVIDIA Container Toolkit

@montanalow
Copy link
Contributor

Closing in favor of #681. Thanks @jsaied99!

@montanalow montanalow closed this Jun 6, 2023
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy