Skip to content

Commit 65da083

Browse files
authored
Mac docs update (#847)
1 parent 53b3ced commit 65da083

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

pgml-dashboard/content/docs/guides/setup/v2/installation.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,39 +93,24 @@ version accordingly if yours is different. Other flavors of Linux should work, b
9393

9494
5. Install [pgrx](https://github.com/tcdi/pgrx) and build the extension (this will take a few minutes):
9595

96-
<strong>With Python Support:</strong>
96+
<strong>With Python:</strong>
9797

9898
```
9999
export POSTGRES_VERSION=15
100100
cargo install cargo-pgrx --version "0.9.8" --locked && \
101-
cargo pgrx init --pg${POSTGRES_VERSION} /usr/bin/pg_config && \
102-
cargo pgrx package
101+
cargo pgrx install --pg-config /usr/bin/pg_config
103102
```
104103

105-
<strong>Without Python Support:</strong>
104+
<strong>Without Python:</strong>
106105
```
107106
export POSTGRES_VERSION=15
108107
cp docker/Cargo.toml.no-python Cargo.toml && \
109108
cargo install cargo-pgrx --version "0.9.8" --locked && \
110-
cargo pgrx init --pg${POSTGRES_VERSION} /usr/bin/pg_config && \
111-
cargo pgrx package
112-
```
113-
114-
6. Copy the extension binaries into Postgres system folders:
115-
```
116-
export POSTGRES_VERSION=15
117-
# Copy the extension .so
118-
sudo cp target/release/pgml-pg${POSTGRES_VERSION}/usr/lib/postgresql/${POSTGRES_VERSION}/lib/* \
119-
/usr/lib/postgresql/${POSTGRES_VERSION}/lib
120-
# Copy the control & SQL files
121-
sudo cp target/release/pgml-pg${POSTGRES_VERSION}/usr/share/postgresql/${POSTGRES_VERSION}/extension/* \
122-
/usr/share/postgresql/${POSTGRES_VERSION}/extension
109+
cargo pgrx install --pg-config /usr/bin/pg_config
123110
```
124111

125112
=== "From Source (Mac)"
126113

127-
<i>N.B:</i> Apple M1s have an issue with `openmp` which XGBoost and LightGBM depend on; some additional steps are required. See this [issue](https://github.com/postgresml/postgresml/issues/364) for more details.
128-
129114
1. Install the latest Rust compiler from [rust-lang.org](https://www.rust-lang.org/learn/get-started).
130115

131116
2. Clone our git repository:
@@ -138,14 +123,13 @@ version accordingly if yours is different. Other flavors of Linux should work, b
138123

139124
3. Install PostgreSQL and other dependencies:
140125
```
141-
brew install llvm postgresql cmake openssl pkg-config
126+
brew install llvm postgresql@15 cmake openssl pkg-config openblas libomp
142127
```
143128

144129
4. Install [pgrx](https://github.com/tcdi/pgrx) and build the extension (this will take a few minutes):
145130
```
146131
cargo install cargo-pgrx && \
147-
cargo pgrx init --pg15 /usr/bin/pg_config && \
148-
cargo pgrx install
132+
cargo pgrx install --pg-config /opt/homebrew/opt/postgresql@15/bin/pg_config
149133
```
150134

151135
===
@@ -160,12 +144,24 @@ PostgresML needs to be preloaded at server startup, so you need to add it into `
160144
shared_preload_libraries = 'pgml,pg_stat_statements'
161145
```
162146

147+
On Ubuntu, this can be configured by changing `/etc/postgresql/15/main/postgresql.conf`. On Mac, the config file is located in `/opt/homebrew/var/postgresql@15/postgresql.conf`.
148+
163149
This setting change requires PostgreSQL to be restarted:
164150

151+
=== "Ubuntu"
152+
165153
```bash
166154
sudo service postgresql restart
167155
```
168156

157+
=== "Mac"
158+
159+
```bash
160+
brew services restart postgresql@15
161+
```
162+
163+
===
164+
169165
#### Install into database
170166

171167
!!! note

0 commit comments

Comments
 (0)