-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/lazaroDevelop' into lazaroDevelop
- Loading branch information
Showing
95 changed files
with
1,506 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
FROM ubuntu:18.04 as dependencies_ready | ||
ARG PRELOAD_GRAPH | ||
ENV PRELOAD_GRAPH "$PRELOAD_GRAPH" | ||
FROM ubuntu:18.04 as os_dependencies_ready | ||
|
||
RUN apt-get update -qq | ||
RUN apt-get install -y -qq git curl wget build-essential | ||
FROM dependencies_ready | ||
|
||
FROM os_dependencies_ready as backend_dependencies | ||
|
||
WORKDIR /archgraph_setup | ||
COPY ./conf /archgraph_setup/conf | ||
COPY ./requirements.txt /archgraph_setup/requirements.txt | ||
COPY ./frontend/package.json /archgraph_setup/frontend/package.json | ||
RUN ./conf/install_backend.sh | ||
|
||
FROM backend_dependencies as frontend_dependencies | ||
RUN ./conf/install_frontend.sh | ||
|
||
FROM frontend_dependencies as archgraph_installed | ||
COPY . /archgraph | ||
RUN mv /archgraph_setup/frontend/* /archgraph/frontend | ||
|
||
FROM archgraph_installed as cleanup_complete | ||
RUN rm -rf /archgraph_setup | ||
|
||
WORKDIR /archgraph | ||
RUN ./conf/install.sh | ||
|
||
ENTRYPOINT [ "./conf/run.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,11 @@ | ||
#!/bin/bash | ||
|
||
ROOT_DIR=$(pwd) | ||
echo "Running at $ROOT_DIR" | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
ARCHGRAPH_ENV="archgraph" | ||
PYTHON27_ENV="nodegyp-python27" | ||
source "$DIR/install_backend.sh" | ||
source "$DIR/install_frontend.sh" | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
# Do something under Mac OS X platform | ||
if [ $(conda > /dev/null) > /dev/null ]; then | ||
brew cask install miniconda || brew cask upgrade miniconda | ||
else | ||
echo "Miniconda already installed, continuing..." | ||
fi | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] ; then | ||
if ! type conda &> /dev/null ; then | ||
# Do something under GNU/Linux platform | ||
rm -rf Miniconda3-latest-Linux-x86_64.sh | ||
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
chmod +x Miniconda3-latest-Linux-x86_64.sh | ||
./Miniconda3-latest-Linux-x86_64.sh -b -p "$HOME/miniconda" || ./Miniconda3-latest-Linux-x86_64.sh -u -b -p "$HOME/miniconda" | ||
rm -rf Miniconda3-latest-Linux-x86_64.sh | ||
else | ||
echo "Miniconda already installed, continuing..." | ||
fi | ||
fi | ||
|
||
# run conda | ||
if [ "$(uname)" == "Darwin" ]; then | ||
source "$HOME/.bash_profile" | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
source "$HOME/.profile" | ||
fi | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
# make conda binary available in path | ||
export PATH="$HOME/miniconda/bin":$PATH | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
# init conda cli | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
fi | ||
|
||
conda init bash | ||
conda create --quiet -y -n "$PYTHON27_ENV" python=2.7 anaconda | ||
conda activate "$PYTHON27_ENV" | ||
PYTHON27_PATH=$(which python) | ||
echo "Node-Gyp interpreter Python (2.7) is at: ---> ${PYTHON27_PATH} <---" | ||
|
||
# create archgraph env | ||
conda create --quiet -y -n "$ARCHGRAPH_ENV" python=3.7 anaconda | ||
conda activate "$ARCHGRAPH_ENV" | ||
|
||
# Get location of python interpreter | ||
PYTHON_PATH=$(which python) | ||
echo "Python interpreter is at: ---> ${PYTHON_PATH} <---" | ||
|
||
# install pip | ||
conda install pip -y --all --quiet | ||
echo "Pip at: ---> $(which pip) <---" | ||
# (optional) install any requirements of your current app in this venv | ||
pip install -r "$ROOT_DIR/requirements.txt" | ||
|
||
|
||
# install nodejs and yarn | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | ||
|
||
# activate nvm | ||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | ||
|
||
#install nodejs | ||
nvm install v10 | ||
nvm use v10 | ||
|
||
# install frontend stuff | ||
cd frontend | ||
npm install -g npm@latest | ||
npm config set python "$PYTHON27_PATH" | ||
npm install | ||
|
||
# preload graph | ||
if [ -z "$PRELOAD_GRAPH" ] ; then | ||
echo "Preload graph flag is not active, skipping tests" | ||
else | ||
echo "Preload graph flag is active, loading graph through tests" | ||
coverage run -m unittest discover test || true | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=$(pwd) | ||
echo "Running at $ROOT_DIR" | ||
|
||
ARCHGRAPH_ENV="archgraph" | ||
PYTHON27_ENV="nodegyp-python27" | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
# Do something under Mac OS X platform | ||
if [ $(conda > /dev/null) > /dev/null ]; then | ||
brew cask install miniconda || brew cask upgrade miniconda | ||
else | ||
echo "Miniconda already installed, continuing..." | ||
fi | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] ; then | ||
if ! type conda &> /dev/null ; then | ||
# Do something under GNU/Linux platform | ||
rm -rf Miniconda3-latest-Linux-x86_64.sh | ||
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
chmod +x Miniconda3-latest-Linux-x86_64.sh | ||
./Miniconda3-latest-Linux-x86_64.sh -b -p "$HOME/miniconda" || ./Miniconda3-latest-Linux-x86_64.sh -u -b -p "$HOME/miniconda" | ||
rm -rf Miniconda3-latest-Linux-x86_64.sh | ||
else | ||
echo "Miniconda already installed, continuing..." | ||
fi | ||
fi | ||
|
||
# run conda | ||
if [ "$(uname)" == "Darwin" ]; then | ||
source "$HOME/.bash_profile" | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
source "$HOME/.profile" | ||
fi | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
# make conda binary available in path | ||
export PATH="$HOME/miniconda/bin":$PATH | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
# init conda cli | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
fi | ||
|
||
conda init bash | ||
conda create --quiet -y -n "$PYTHON27_ENV" python=2.7 anaconda | ||
conda activate "$PYTHON27_ENV" | ||
PYTHON27_PATH=$(which python) | ||
echo "Node-Gyp interpreter Python (2.7) is at: ---> ${PYTHON27_PATH} <---" | ||
|
||
# create archgraph env | ||
conda create --quiet -y -n "$ARCHGRAPH_ENV" python=3.7 anaconda | ||
conda activate "$ARCHGRAPH_ENV" | ||
|
||
# Get location of python interpreter | ||
PYTHON_PATH=$(which python) | ||
echo "Python interpreter is at: ---> ${PYTHON_PATH} <---" | ||
|
||
# install pip | ||
conda install pip -y --all --quiet | ||
echo "Pip at: ---> $(which pip) <---" | ||
# (optional) install any requirements of your current app in this venv | ||
pip install -r "$ROOT_DIR/requirements.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT_DIR=$(pwd) | ||
echo "Installing frontend dependencies at $ROOT_DIR" | ||
|
||
ARCHGRAPH_ENV="archgraph" | ||
PYTHON27_ENV="nodegyp-python27" | ||
|
||
# install nodejs and yarn | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | ||
|
||
# activate nvm | ||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | ||
|
||
#install nodejs | ||
nvm install v10 | ||
nvm use v10 | ||
|
||
# install frontend stuff | ||
cd "$ROOT_DIR/frontend" | ||
npm install -g npm@latest | ||
npm config set python "$PYTHON27_PATH" | ||
npm install | ||
echo "Current directory: $(pwd)" | ||
ls -la | ||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.