Closed gbengataylor closed 2 years ago
another possibility - @andykrohg suggested that we make the export executable from homeroom and tunnel the command to run on CRW. something like
oc exec <crw-pod> -- export ...
That or we could do
oc rsh <crw-pod> -c python
export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
export ENDPOINT_URL=$ENDPOINT_URL
export BUCKET_NAME=$BUCKET_NAME
export MODEL_FILE_NAME=model.pkl
FLASK_APP=prediction.py FLASK_ENV=development flask run
That or we could do
oc rsh <crw-pod> -c python export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY export ENDPOINT_URL=$ENDPOINT_URL export BUCKET_NAME=$BUCKET_NAME export MODEL_FILE_NAME=model.pkl FLASK_APP=prediction.py FLASK_ENV=development flask run
I tested this, and unfortunately this does not work. The ENV variables don't carry over in the reverse shell session into the CRW pod. I will use the original suggestion of exporting to a text file and then outputting the contents.
Make it executable on the homeroom terminal then possibly change to