You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-docs/docs/guides/deployment/self-hosting/building-from-source.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
#Building from Source
2
2
3
-
PostgresML is a Postgres extension written in Rust, so it can be built and installed on any systemthatsupported by PostgreSQL and the Rust compiler. If you're planning on using GPU acceleration for Large Language Models or for XGBoost / LightGBM supervised learning, we would recommend you use an operating system well supported by Nvidia drivers and Cuda. Thankfully, that list is pretty large these days, including popular distributions like Ubuntu, Debian, RHEL, Centos, Fedora and OpenSuse.
3
+
PostgresML is a Postgres extension written in Rust, so it can be built and installed on any system supported by PostgreSQL and the Rust compiler. If you're planning on using GPU acceleration for Large Language Models or for XGBoost / LightGBM supervised learning, we would recommend you use an operating system well supported by Nvidia drivers and Cuda. Thankfully, that list is pretty large these days, including popular distributions like Ubuntu, Debian, RHEL, Centos, Fedora and OpenSuse.
4
4
5
5
###Dependencies
6
6
7
-
PostgresML depends on a few system packages and libraries that should be installed separately in order to successfully compile it from source. The names of the packages vary based on the Linux distribution you're using, but in most cases you should be able to find all of themverbatimin your packagemanger repositories:
7
+
PostgresML depends on a few system packages and libraries that should be installed separately. The names of the packages vary based on the Linux distribution you're using, but in most cases you should be able to find all of them in your packagemanager repositories:
8
8
9
9
```
10
10
cmake
@@ -20,11 +20,11 @@ postgresql-server-dev-14
20
20
lld
21
21
```
22
22
23
-
This guide assumes that you're using PostgreSQL 14, so if your Postgres version is different, replace`14` in`postgresql-server-dev-14` with the correct version of Postgres. PostgresML supports all Postgres versions supported by`pgrx` and the PostgreSQL community (as of this writing, versions 12 through 16).
23
+
This guide assumes that you're using PostgreSQL 14, so if your Postgres version is different, replace`14` in`postgresql-server-dev-14` with the correct version. PostgresML supports all Postgres versions supported by`pgrx` and the PostgreSQL community (as of this writing, versions 12 through 16).
24
24
25
25
###Getting the source code
26
26
27
-
All of our source code is open source and hostedin GitHub. You can download it with git:
27
+
All of our source code is open source and hostedon GitHub. You can download it with git:
@@ -36,11 +36,11 @@ The repository contains the extension, the dashboard, SDKs, and all apps we've w
36
36
37
37
###Installing PostgresML
38
38
39
-
For a typical deployment in production, you would need to compile and install the extension into your system PostgreSQL installation. PostgresML is using the`pgrx` Rust extension toolkit, so this ispretty easy andstraight forward to do.
39
+
For a typical deployment in production, you would need to compile and install the extension into your system PostgreSQL installation. PostgresML is using the`pgrx` Rust extension toolkit, so this is straight forward.
40
40
41
41
####Install pgrx
42
42
43
-
`pgrx` is open source and available from crates.io. We are currently using the`0.10.0` version. It's important that your`pgrx` version matches what we're using, since there are some hard dependencies between our code andtheirs.
43
+
`pgrx` is open source and available from crates.io. We are currently using the`0.10.0` version. It's important that your`pgrx` version matches what we're using, since there are some hard dependencies between our code and`pgrx`.
44
44
45
45
To install`pgrx`, simply run:
46
46
@@ -63,9 +63,9 @@ cd pgml-extension && \
63
63
cargo pgrx package
64
64
```
65
65
66
-
This will produce a number of artifacts in`target/release/pg14-pgml` which you can then copy to their respective folders in`/usr` using`sudo cp`. At the timeof thiswriting,`pgrx`is working on a command that does this automatically, but ithas not been released yet.
66
+
This will produce a number of artifacts in`target/release/pg14-pgml` which you can then copy to their respective folders in`/usr` using`sudo cp`. At the time writing,`pgrx`was working on a command that does this automatically, but itwas not been released yet.
67
67
68
-
Once the files are copiedto their respective folders in`/usr`, you need to make surethe`pgml` extension is loaded in`shared_preload_libraries`. We use shared memory to control model versioning and other cool things that make PostgresML "just work". In`/etc/postgresql/14/main/postgresql.conf`, change or add the following line:
68
+
Once the files are copiedinto their respective folders in`/usr`, you need to make surethat the`pgml` extension is loaded in`shared_preload_libraries`. We use shared memory to control model versioning and other cool things that make PostgresML "just work". In`/etc/postgresql/14/main/postgresql.conf`, change or add the following line:
69
69
70
70
```
71
71
shared_preload_libraries = 'pgml'
@@ -79,7 +79,7 @@ sudo service postgresql restart
79
79
80
80
####Validate the installation
81
81
82
-
To make sure PostgresML is installed, you can create the extension in a database of your choice:
82
+
To make sure PostgresML is installed correctly, you can create the extension in a database of your choice: