theroyallab / tabbyAPI

An OAI compatible exllamav2 API that's both lightweight and fast
GNU Affero General Public License v3.0
503 stars 67 forks source link

[REQUEST] Update the docker section in the wiki #182

Closed AmgadHasan closed 4 weeks ago

AmgadHasan commented 1 month ago

Problem

Hi,

The current section in the wiki for deploying using docker doesn't include the latest changes where we have published docker images. I have modified it to reflect the new changes where the users can choose to use the pre built images and skip the step of building it which takes a lot of time and resources.

cc @br

Solution

Here is the modified section:

Docker

Building from dockerfile

  1. Install Docker and docker compose from the docs
  2. Install the Nvidia container compatibility layer a. For Linux: Nvidia container toolkit b. For Windows: Cuda Toolkit on WSL
  3. Clone TabbyAPI via
    git clone https://github.com/theroyallab/tabbyAPI
  4. Enter the tabbyAPI directory by
    cd tabbyAPI
  5. Optional: Set up a config.yml or api_tokens.yml (configuration)
  6. Update the volume mount section in the docker/docker-compose.yml file
    volumes:
    # - /path/to/models:/app/models                       # Change me
    # - /path/to/config.yml:/app/config.yml               # Change me
    # - /path/to/api_tokens.yml:/app/api_tokens.yml       # Change me
  7. Run the following to build the docker image and start the server inside the container:
    docker compose -f docker/docker-compose.yml up

    Deploying from published image

  8. Follow steps 1-6 from Building from dockerfile
  9. Modify the docker compose file as follows:
    # Comment out the build section
    # build:
    #   context: ..
    #   dockerfile: ./docker/Dockerfile
    #   args:
    #     - DO_PULL=true
    # Point the compose file to the latest built image
    image: ghcr.io/theroyallab/tabbyapi:latest
  10. Run the following to build the docker image and start the server inside the container:
    docker compose -f docker/docker-compose.yml up

Alternatives

No response

Explanation

Improve the docs

Examples

No response

Additional context

No response

Acknowledgements

bdashore3 commented 4 weeks ago

Made it more concise with an optional 6th step. Closing.