Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move jq overwrites from entrypoint to deployment script. Closes #1627 #1640

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .deployment/deploy-deepforge
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ DEEPFORGE_DEPLOYMENT_DIR="$(realpath "$(dirname "$0")")"
export DEEPFORGE_DEPLOYMENT_DIR

. ~/.nvm/nvm.sh

SERVER_NAME="server"

if [[ $1 = "stable" ]]; then
SERVER_NAME="server_stable"
fi;

# This will overwrite config/components.json on the local source tree (please use with discretion)
< config/components.json jq '.Compute.backends=(.Compute.backends | map(select(. != "local")))' \
> config/components2.json
< config/components2.json jq '.Storage.backends=(.Storage.backends | map(select(. != "gme")))' \
> config/components.json
rm config/components2.json

# Merging the custom override yml file
yaml-merge docker/docker-compose.yml "$DEEPFORGE_DEPLOYMENT_DIR"/docker-compose-overrides.yml > custom-docker-compose.yml

Expand Down
8 changes: 0 additions & 8 deletions .deployment/dev-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ source activate deepforge-server
pip uninstall tensorflow -y
conda install tensorflow==1.14 -y

# Install jq and remove local from config/components.json file
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq && chmod +x jq

< config/components.json ./jq '.Compute.backends=(.Compute.backends | map(select(. != "local")))' \
> config/components2.json
< config/components2.json ./jq '.Storage.backends=(.Storage.backends | map(select(. != "gme")))' \
> config/components.json
rm config/components2.json

deepforge start --server

2 changes: 2 additions & 0 deletions .deployment/docker-compose-overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
- "$HOME/.deepforge/blob:/data/blob"
- "${TOKEN_KEYS_DIR}:/token_keys"
- "${DEEPFORGE_DEPLOYMENT_DIR}:/.deployment"
- "${DEEPFORGE_DEPLOYMENT_DIR}/../config:/deepforge/config"

server_stable:
entrypoint: /.deployment/dev-entrypoint.sh
Expand All @@ -20,5 +21,6 @@ services:
- "$HOME/.deepforge/blob:/data/blob"
- "${TOKEN_KEYS_DIR}:/token_keys"
- "${DEEPFORGE_DEPLOYMENT_DIR}:/.deployment"
- "${DEEPFORGE_DEPLOYMENT_DIR}/../config:/deepforge/config"
depends_on:
- mongo