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 setup on mac m2 #175

Open
cornoctopus opened this issue Oct 10, 2023 · 2 comments
Open

Docker setup on mac m2 #175

cornoctopus opened this issue Oct 10, 2023 · 2 comments

Comments

@cornoctopus
Copy link

Hello. Is it possible to use container with extras on m2 mac? I'm not sure because dockerfile has:
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04

And also in guide for local install I see this:
If you run on Apple Silicon (M1/M2), use the requirements-silicon.txt file instead.

@Cohee1207
Copy link
Member

I have limited knowledge about running Extras in Docker, especially on Mac, I was running it natively on M1 and it works great. You can just try running it in Docker yourself. If it doesn't work - look to adjust the dockerfile to remove the nvidia base image and replace it with vanilla ubuntu.

@Dalethium
Copy link
Contributor

Dalethium commented Oct 19, 2023

in your docker compose build section, to use silicon, do this:

  args:
    REQUIREMENTS: requirements-silicon.txt

Here's a snippit of my docker compose:

services:
  sillytavernextras:
    runtime: nvidia
    image: cohee1207/sillytavern-extras
    build:
      context: ./SillyTavern-Extras/
      dockerfile: ./SillyTavern-Extras/docker/Dockerfile
      args:
        REQUIREMENTS: requirements-complete.txt
        MODULES: caption,summarize,classify,chromadb
    volumes:
      - "/chromadb:/chromadb"
      - "/cache:/root/.cache"
      - /sillytavernextras/api_key.txt:/sillytavern-extras/api_key.txt
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    command: python server.py --enable-modules=caption,summarize,classify,chromadb --listen --chroma-folder=/chromadb/ --chroma-persist --secure --classification-model=joeddav/distilbert-base-uncased-go-emotions-student --cuda --port=443
    

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

No branches or pull requests

3 participants