Skip to content
Aurélien Cavelan edited this page Sep 4, 2020 · 6 revisions

Install the required dependencies

conda create -n dask-om
conda install postgresql psycopg2 sqlalchemy dask distributed dask-jobqueue -c conda-forge

add the line: export PATH=$PATH:~/.local/bin to your ~/.bashrc file

Setup Postgres SQL

Create the database:

sudo -iu postgres
pg_ctl init -D /var/lib/postgres/data

Come back to the normal user (ctrl+D). Then create a default databse, use as an admin database, or just a placeholder. we always connect to a database, so we must create a default one before we can use it.

createdb default

Finally, start the database server:

pg_ctl start -D <db>

pg_hba.conf

host all all 0.0.0.0/0 md5 postgresql.conf

listen_addresses='*' You have to check if the port 5432 is open: http://www.yougetsignal.com/tools/open-ports/

If it's not then add a rule to your iptables:

iptables -A INPUT -s 0/0 -p tcp --dport 5432 -j ACCEPT 0/0: If you want anybody to access it. You can change it to a specific IP address or range of IP addresses. srun psql -U cavelan -h 10.41.0.140 om_run -c "SELECT * FROM parameters;

Clone this wiki locally