forked from ryan-blunden/django-chatgpt-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix1.working_too
36 lines (34 loc) · 931 Bytes
/
shell.nix1.working_too
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShell {
buildInputs = [
pkgs.postgresql
pkgs.git
pkgs.gcc
pkgs.cmake
pkgs.python311
pkgs.openssl
pkgs.libjpeg
pkgs.zlib
pkgs.docker
#pkgs.ollama
#pkgs.python311Packages.litellm
];
shellHook = ''
if [ ! -d "pgvector" ]; then
echo "Cloning pgvector from GitHub..."
git clone https://github.com/pgvector/pgvector.git pgvector_install
fi
cd pgvector_install
echo "Building and installing pgvector..."
# Add commands to build and install pgvector
#export PG_CONFIG=/nix/store/ykvqds6by64yfns3sndh8p50h26fc1g9-postgresql-15.5/bin/pg_config
export PG_CONFIG=${pkgs.postgresql}/bin/pg_config
make
sudo --preserve-env=PG_CONFIG make install
cd ..
rm -rf pgvector_install
'';
}