forked from facebookresearch/Mephisto
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from d-lab/deployment-test
Update DNS and disable dockerimage build cache
- Loading branch information
Showing
5 changed files
with
19 additions
and
4 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
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,4 @@ | ||
#!/bin/bash | ||
|
||
mephisto register "$MTURK_TYPE" name="$MTURK_NAME" access_key_id="$MTURK_ACCESS_KEY_ID" secret_access_key="$MTURK_SECRET_ACCESS_KEY" | ||
mephisto register prolific name=prolific api_key="$PROLIFIC_API_KEY" |
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,3 +1,10 @@ | ||
import os | ||
|
||
APP_NAME = os.getenv('APP_NAME', 'temp') | ||
APP_ENV = os.getenv('APP_ENV', 'dev') | ||
def handle(*args): | ||
print("Running pre deployment hook") | ||
|
||
if APP_NAME == 'test' or APP_ENV == 'prod': | ||
print("Running on remote server. Executing init_setup.sh") | ||
os.system(f"sh {os.path.dirname(os.path.realpath(__file__))}/init_setup.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,10 +1,13 @@ | ||
#!/bin/bash | ||
APP_NAME=${1:-temp-app} | ||
S3_BUCKET_NAME=${2:-s3://mephisto-data} | ||
LOG_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
|
||
mephisto_data_root="/mephisto/data/results" | ||
|
||
echo "[$(date)] Syncing $mephisto_data_root to $S3_BUCKET_NAME/data-v2/$APP_NAME!" | ||
aws s3 sync $mephisto_data_root $S3_BUCKET_NAME/data-v2/$APP_NAME | ||
FOLDER_NAME="$APP_NAME-$LOG_TIME" | ||
|
||
echo "[$(date)] Syncing $mephisto_data_root to $S3_BUCKET_NAME/data-v2/$FOLDER_NAME!" | ||
aws s3 sync $mephisto_data_root $S3_BUCKET_NAME/data-v2/$FOLDER_NAME --profile mpt | ||
|
||
echo "[$(date)] Sync complete!" |
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