Skip to content

Commit

Permalink
remove ssh info
Browse files Browse the repository at this point in the history
  • Loading branch information
jgibson517 committed May 26, 2024
1 parent 8eb53d1 commit 8766935
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
3 changes: 1 addition & 2 deletions civiclens/deploy/launch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Script to autodeploy CivicLens NLP jobs"""
import pydo

from civiclens.utils.constants import DIGITAL_OCEAN, SSH_ID
from civiclens.utils.constants import DIGITAL_OCEAN


do_client = pydo.Client(token=DIGITAL_OCEAN)
Expand All @@ -15,7 +15,6 @@
"size": "s-4vcpu-8gb",
"image": "ubuntu-24-04-x64",
"user_data": cloud_config,
"ssh_keys": [SSH_ID],
"monitoring": True,
}

Expand Down
19 changes: 2 additions & 17 deletions civiclens/deploy/run_civiclens_nlp.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/bin/bash

# set paths for logging nlp batch info
LOG_DIR="/home/civiclens-nlp/CivicLens/civiclens/log"
LAST_UPDATE_FILE="${LOG_DIR}/nlp_batch.csv"
# set paths
PROJECT_DIR="/home/civiclens-nlp/CivicLens/"
VENV_PATH="/home/civiclens-nlp/CivicLens/.venv/bin/activate"
# fetch droplet ID for instance deletion
DROPLET_ID=$(curl "http://169.254.169.254/metadata/v1/id")
echo "export DROPLET_ID=$DROPLET_ID" >> ~/.zshenv
Expand All @@ -13,11 +10,6 @@ source ~/.zshenv
echo "===================================="
echo "Running NLP Update..."

# make sure logging directory exists
if [ ! -d "$LOG_DIR" ]; then
mkdir -p "$LOG_DIR"
fi

# go to project directory if exists
if [ -d "$PROJECT_DIR" ]; then
cd "$PROJECT_DIR"
Expand All @@ -30,11 +22,4 @@ fi
poetry install

# Run NLP update
if poetry run python3 -m civiclens.nlp.pipeline --cloud; then
# Log success
echo "$(date +'%Y-%m-%d %H:%M:%S'), SUCCESS, NLP updated completed successfully" >> "$LAST_UPDATE_FILE"
else
# Log failure
echo "$(date +'%Y-%m-%d %H:%M:%S'), ERROR, NLP update failed" >> "$LAST_UPDATE_FILE"
exit 1
fi
poetry run python3 -m civiclens.nlp.pipeline --cloud
1 change: 0 additions & 1 deletion civiclens/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
DATABASE_TEST = os.environ.get("DATBASE_TEST")
DIGITAL_OCEAN = os.environ.get("DIGITAL_OCEAN")
DROPLET_ID = os.environ.get("DROPLET_ID")
SSH_ID = os.environ.get("SSH_ID")

# Regulations.GOV
REG_GOV_API_KEY = os.environ.get("REG_GOV_API_KEY")

0 comments on commit 8766935

Please sign in to comment.