diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index b56bc7d..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Create and publish docker image - -on: - workflow_dispatch: - push: - branches: [ "main" ] - paths: - - 'poetry.lock' - - 'tabby/**' - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - # This is used to complete the identity challenge - # with sigstore/fulcio when running outside of PRs. - id-token: write - - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: true - - # all of these default to true, but feel free to set to - # "false" if necessary for your workflow - android: true - dotnet: true - haskell: true - large-packages: false - swap-storage: true - - - name: Checkout repository - uses: actions/checkout@v3 - - # Workaround: https://github.com/docker/build-push-action/issues/461 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2.0.0 - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into GitHub Container registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v2.0.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Log into Docker Hub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2.0.0 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Generate image name - run: | - echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} - - - uses: int128/docker-build-cache-config-action@v1 - id: cache - with: - image: ghcr.io/${{ env.IMAGE_NAME }}/cache - - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v3.1.1 - with: - file: Dockerfile - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: | - ghcr.io/${{ env.IMAGE_NAME }}:latest - ${{ env.IMAGE_NAME }}:latest - cache-from: ${{ steps.cache.outputs.cache-from }} - cache-to: ${{ steps.cache.outputs.cache-to }} - - - name: Docker Hub Description - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: tabbyml/tabby diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6d381d6..0000000 --- a/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -# syntax = docker/dockerfile:1.5 - -FROM tabbyml/fastertransformer_backend - -RUN apt update && apt -y install build-essential libssl-dev zlib1g-dev \ - libbz2-dev libreadline-dev libsqlite3-dev curl \ - libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev - -RUN mkdir -p /home/app -RUN chown 1000 /home/app - -USER 1000 -WORKDIR /home/app -ENV HOME /home/app - -# Setup pyenv -RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv -ENV PATH="$HOME/.pyenv/shims:/home/app/.pyenv/bin:$PATH" - -ARG PYTHON_VERSION=3.10.10 -RUN pyenv install ${PYTHON_VERSION} -RUN pyenv global ${PYTHON_VERSION} - -ARG PYPI_INDEX_URL=https://pypi.org/simple -ARG POETRY_VERSION=1.4.0 - -RUN --mount=type=cache,target=$HOME/.cache pip install -i $PYPI_INDEX_URL "poetry==$POETRY_VERSION" - -# vector -RUN < dagu.tar.gz - tar zxvf dagu.tar.gz - mv dagu ~/.bin/ - rm dagu.tar.gz LICENSE.md README.md -EOF - -# Install tabby dependencies -COPY poetry.lock pyproject.toml ./ -RUN poetry export --without-hashes > requirements.txt -RUN --mount=type=cache,target=$HOME/.cache pip install -i $PYPI_INDEX_URL --no-dependencies -r requirements.txt - -COPY tabby ./tabby - -# Install caddy -RUN < - -2. Get the [deployment folder](./): - ```bash - git clone https://github.com/TabbyML/tabby - cd tabby/deployment/skypilot - ``` - -3. run: - ```bash - sky launch -c tabby default.yml - ``` - -4. Open another terminal and run: - ```bash - ssh -L 5000:localhost:5000 tabby - ``` - -5. Open http://localhost:5000 in your browser and start coding! -![tabby admin server](https://user-images.githubusercontent.com/388154/227792390-ec19e9b9-ebbb-4a94-99ca-8a142ffb5e46.png) - -## Cleaning up -When you are done, you can stop or tear down the cluster: - -- **To stop the cluster**, run - ```bash - sky stop tabby # or pass your custom name if you used "-c " - ``` - You can restart a stopped cluster and relaunch the chatbot (the `run` section in YAML) with - ```bash - sky launch default.yml -c tabby --no-setup - ``` - Note the `--no-setup` flag: a stopped cluster preserves its disk contents so we can skip redoing the setup. -- **To tear down the cluster** (non-restartable), run - ```bash - sky down tabby # or pass your custom name if you used "-c " - ``` diff --git a/deployment/skypilot/default.yml b/deployment/skypilot/default.yml deleted file mode 100644 index 6e1aa06..0000000 --- a/deployment/skypilot/default.yml +++ /dev/null @@ -1,25 +0,0 @@ -resources: - accelerators: A100:1 - disk_size: 1024 - -setup: | - set -ex - - # On some cloud providers, docker-compose is not installed by default. - sudo curl -L https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose - sudo chmod a+x /usr/local/bin/docker-compose - - # Pull tabby images. - git clone https://github.com/TabbyML/tabby.git || true - cd tabby/deployment - - # On certain cloud providers (e.g lambda cloud), the default user is not added to docker group, so we need sudo here - sudo docker-compose pull - - # Add current user to docker group, it won't take effect immediately as skypilot job is started by a long-running daemon. - sudo usermod -aG docker $USER - - -run: | - cd tabby/deployment - sudo MODEL_REPLICA=${MODEL_REPLICA:-8} docker-compose -f docker-compose.yml -f docker-compose.triton.yml up diff --git a/development/.gitignore b/development/.gitignore deleted file mode 100644 index 1269488..0000000 --- a/development/.gitignore +++ /dev/null @@ -1 +0,0 @@ -data diff --git a/development/Dockerfile b/development/Dockerfile deleted file mode 100644 index cefa0ef..0000000 --- a/development/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM tabbyml/tabby - -ARG PYPI_INDEX_URL=https://pypi.org/simple diff --git a/development/Makefile b/development/Makefile deleted file mode 100644 index 770edf0..0000000 --- a/development/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -DEFAULT := -UP_FLAGS := up --remove-orphans - -build: - docker-compose -f ../deployment/docker-compose.yml -f docker-compose.dev.yml build - -dev: - docker-compose -f ../deployment/docker-compose.yml -f docker-compose.dev.yml $(UP_FLAGS) - -dev-triton: - docker-compose -f ../deployment/docker-compose.yml -f ../deployment/docker-compose.triton.yml -f docker-compose.dev.yml $(UP_FLAGS) diff --git a/development/docker-compose.dev.yml b/development/docker-compose.dev.yml deleted file mode 100644 index ed9d046..0000000 --- a/development/docker-compose.dev.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3.3' - -services: - tabby: - image: tabbyml/tabby:dev - build: - context: .. - dockerfile: ./development/Dockerfile - args: - PYPI_INDEX_URL: https://mirrors.aliyun.com/pypi/simple - environment: - UVICORN_RELOAD: true - VECTOR_WATCH_CONFIG: true - STREAMLIT_RUN_ON_SAVE: true - CADDY_WATCH_CONFIG: true - STREAMLIT_HIDE_MENU: false - volumes: - - ../tabby:/home/app/tabby - ports: - - 8083:8083 - - 8084:8084