Last active
May 26, 2023 13:57
-
-
Save augray/e72d8f1abc4b5213eeab3de86854c464 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
set -euoxv pipefail | |
VENV="$HOME/venvs/test_wheel" | |
MAKE_WHEEL_VENV="$HOME/venvs/dev39" | |
PYTHON_VERSION=3.9 | |
SEMATIC_DIR="$HOME/code/sematic" | |
TEMP_DIR="$HOME/tmp" | |
SETTINGS_DIR="$HOME/.sematic" | |
BACKUP_SETTINGS_DIR="$HOME/.sematic.bak" | |
PYTHON_EXE_NAME="python$PYTHON_VERSION" | |
if [ ! -d "$BACKUP_SETTINGS_DIR" ]; then | |
mkdir $BACKUP_SETTINGS_DIR | |
if [ -d "$BACKUP_SETTINGS_DIR" ]; then | |
cp -r "$SETTINGS_DIR/*" "$BACKUP_SETTINGS_DIR" | |
fi | |
fi | |
rm -rf $SETTINGS_DIR || echo "No settings dir" | |
source "$MAKE_WHEEL_VENV/bin/activate" | |
pushd "$SEMATIC_DIR" | |
rm -f bazel-bin/sematic/*.whl || echo "No wheels to remove" | |
rm -f $TEMP_DIR/*.whl || echo "No wheels to remove from temp dir" | |
make ui | |
make wheel | |
cp bazel-bin/sematic/*.whl "$TEMP_DIR" | |
pushd "$TEMP_DIR" | |
rm -rf "$VENV" || echo "Can't remove venv" | |
virtualenv --python=$(which $PYTHON_EXE_NAME) "$VENV" | |
source "$VENV/bin/activate" | |
pip install *.whl | |
sematic stop | |
sematic version | |
sematic start | |
pip3 install -r "$VENV/lib/$PYTHON_EXE_NAME/site-packages/sematic/config/../examples/mnist/pytorch/requirements.txt" | |
sematic run examples/mnist/pytorch | |
echo "Please verify that the run shows up in the UI properly!" | |
sleep 120 | |
sematic stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment