diff --git a/.github/workflows/nix_cache.yaml b/.github/workflows/nix_cache.yaml new file mode 100644 index 00000000..967a5982 --- /dev/null +++ b/.github/workflows/nix_cache.yaml @@ -0,0 +1,34 @@ +name: "Cache devshells" +on: + pull_request: + paths: + - "flake.nix" + - "flake.lock" + - "nix/**" +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + tests: + runs-on: + group: aws-highmemory-32-plus-priv + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v14 + with: + name: text-generation-inference + # If you chose signing key for write access + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + env: + USER: github_runner + - name: Build impure devshell + run: nix build .\#devShells.x86_64-linux.impure + - name: Build impure devshell (CUDA dev) + run: nix build .\#devShells.x86_64-linux.impureWithCuda + # Pure shell dependencies are covered by Nix tests. + # - name: Build pure devshell + # run: nix build .\#devShells.x86_64-linux.pure diff --git a/nix/impure-shell.nix b/nix/impure-shell.nix index 92e14bc3..a13fd711 100644 --- a/nix/impure-shell.nix +++ b/nix/impure-shell.nix @@ -9,6 +9,7 @@ cudaPackages, openssl, pkg-config, + poetry, protobuf, python3, pyright, @@ -28,6 +29,7 @@ mkShell { black isort pkg-config + poetry (rust-bin.stable.latest.default.override { extensions = [ "rust-analyzer" diff --git a/nix/server.nix b/nix/server.nix index 5903a65a..237102a8 100644 --- a/nix/server.nix +++ b/nix/server.nix @@ -30,6 +30,7 @@ opentelemetry-semantic-conventions, outlines, peft, + pillow, prometheus-client, punica-kernels, py-cpuinfo, @@ -69,6 +70,7 @@ buildPythonPackage { "huggingface-hub" "loguru" "opentelemetry-instrumentation-grpc" + "pillow" "sentencepiece" "typer" ]; @@ -102,6 +104,7 @@ buildPythonPackage { opentelemetry-semantic-conventions outlines peft + pillow prometheus-client punica-kernels py-cpuinfo