Skip to content

Commit

Permalink
Switch from fetched cog-trt-llm to subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickvP committed May 14, 2024
1 parent 450527e commit 8e0cb7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ in
patchelf --add-rpath ${pythonDrvs.nvidia-pytriton.public}/${site}/nvidia_pytriton.libs $f
done
'';
# TODO: open-source, switch to fetchFromGitHub
deps.cog-trt-llm = builtins.fetchGit {
url = "[email protected]:replicate/cog-trt-llm.git";
rev = "1f092d891b3cefeea5e0b4d39eb4406ebc60d99a";
ref = "main";
};
deps.tensorrt-src = pkgs.fetchFromGitHub {
owner = "NVIDIA";
repo = "TensorRT";
Expand Down
6 changes: 2 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
rootDependencies = [ "nvidia-pytriton" "transformers" "tokenizers" ];
};
cognix.environment.TRITONSERVER_BACKEND_DIR = "${config.deps.backend_dir}/backends";
cognix.sourceIgnores = "cog-trt-llm/";
# don't need this file in a runner
python-env.pip.drvs.tensorrt-libs.mkDerivation.postInstall = lib.mkAfter ''
rm $out/lib/python*/site-packages/tensorrt_libs/libnvinfer_builder_resource*
Expand All @@ -38,10 +39,7 @@
};
# override cog.yaml:
cog.concurrency = lib.mkForce 1;
# copy cog-trt-llm source into /src
cognix.postCopyCommands = ''
cp ${config.deps.cog-trt-llm}/{*.py,cog-trt-llm-config.yaml} $out/src/
'';
cognix.rootPath = lib.mkForce "${./cog-trt-llm}";
# this just needs the examples/ dir
cognix.environment.TRTLLM_DIR = config.deps.tensorrt-llm.examples;
});
Expand Down

0 comments on commit 8e0cb7a

Please sign in to comment.