heavyai / heavydb

HeavyDB (formerly OmniSciDB)
https://heavy.ai
Apache License 2.0
2.92k stars 444 forks source link

[DOC] Add instructions to use the new omniscidb-cpu conda package #334

Open xmnlab opened 5 years ago

xmnlab commented 5 years ago

Hey everyone!

mapd-core-cpu is already available on conda-forge (https://anaconda.org/conda-forge/omniscidb-cpu)

now we should add some instructions on the documentation.

at this moment it is available for linux and osx.

some additional information about the configuration:

  1. for now, always install omniscidb-cpu inside a conda environment (also it is a good practice), eg:
conda create -n omniscidb-cpu
source activate omniscidb-cpu
conda install -c conda-forge omniscidb-cpu
  1. some configuration files:

env-omnisci.sh

#!/usr/bin/env bash

export OMNISCI_PATH="${CONDA_PREFIX}"
export OMNISCI_STORAGE="${OMNISCI_PATH}/var/lib/omnisci"
export OMNISCI_USER="$(whoami)"
export OMNISCI_GROUP="$(groups $(whoami) | cut -d' ' -f1)"
export OMNISCI_DATA="${OMNISCI_STORAGE}/data"
export OMNISCI_LOG="${OMNISCI_DATA}/omnisci_log"

install-omnisci.sh

#!/usr/bin/env bash

mkdir -p "${OMNISCI_STORAGE}"
mkdir -p "${OMNISCI_DATA}"

if [ ! -d "${OMNISCI_DATA}/mapd_catalogs" ]; then
  ${OMNISCI_PATH}/bin/omnisci_initdb "${OMNISCI_STORAGE}"
fi

chown -R $OMNISCI_USER:$OMNISCI_GROUP "${OMNISCI_DATA}"
chown -R $OMNISCI_USER:$OMNISCI_GROUP "${OMNISCI_STORAGE}"

to configure the installation:

source env-omnisci.sh
./install-omnisci.sh

and to run the omnisci_server, type:

# if you don't have the OMNISCI variables in your environment, run: `source env-omnisci.sh`
${OMNISCI_PATH}/bin/omnisci_server --data $OMNISCI_STORAGE

now omnisql should work in conda environment!

xmnlab commented 5 years ago

maybe we could add these files inside the package.

niviksha commented 5 years ago

@randyzwitch ^^^

randyzwitch commented 5 years ago

I'll add this to the README next week after I validate how it works. Will probably make a blog post out of it

randyzwitch commented 5 years ago

@xmnlab The instructions as written throw an error:

(omnisci) root@a4505081f571:~# vim env-omnisci.sh
(omnisci) root@a4505081f571:~# vim install-omnisci.sh
(omnisci) root@a4505081f571:~# source env-omnisci.sh
(omnisci) root@a4505081f571:~# ./install-omnisci.sh
bash: ./install-omnisci.sh: Permission denied
(omnisci) root@a4505081f571:~# bash ./install-omnisci.sh
/root/miniconda3/envs/omnisci/bin/mapd_initdb: error while loading shared libraries: libdouble-conversion.so.3: cannot open shared object file: No such file or directory