Skip to content

Commit cf2e94f

Browse files
committed
Modified the action to copy the whole algo dir contents to Algorithmia
1 parent e884720 commit cf2e94f

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

entrypoint.sh

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,12 @@ if [ $? -eq 0 ]
2828
then
2929
echo "Successfully executed action script, optionally executing the model notebook and uploading the model file to Algorithmia."
3030

31-
if ! [ -e $INPUT_ALGORITHMIA_ALGONAME.py ]
31+
if [ -d $INPUT_ALGORITHMIA_ALGONAME ]
3232
then
33-
echo "$INPUT_ALGORITHMIA_ALGONAME.py does not exist. Checking if $INPUT_ALGORITHMIA_ALGONAME.ipynb exists."
34-
if [ -e $INPUT_ALGORITHMIA_ALGONAME.ipynb ]
35-
then
36-
echo "Found $INPUT_ALGORITHMIA_ALGONAME.ipynb. Will convert this into .py before pushing it to Algorithmia."
37-
jupyter nbconvert --to script $INPUT_ALGORITHMIA_ALGONAME.ipynb
38-
else
39-
echo "Neither $INPUT_ALGORITHMIA_ALGONAME.ipynb or $INPUT_ALGORITHMIA_ALGONAME.py exist."
40-
fi
41-
fi
42-
43-
if [ -e $INPUT_ALGORITHMIA_ALGONAME.py ]
44-
then
45-
echo "Will copy and push $INPUT_ALGORITHMIA_ALGONAME.py to Algorithm repository."
46-
cp -R "$INPUT_ALGORITHMIA_ALGONAME.py" $CI_ALGO_DIR/src/
47-
cp -R requirements.txt $CI_ALGO_DIR/requirements.txt
33+
echo "Will copy and push the contents of $INPUT_ALGORITHMIA_ALGONAME directory to Algorithm repository."
34+
cp -a "$INPUT_ALGORITHMIA_ALGONAME"/. $CI_ALGO_DIR/
4835
else
49-
echo "Will not copy any inference code to Algorithmia."
36+
echo "Could not locate the algorithm directory to push to Algorithmia."
5037
fi
5138

5239
cd $CI_ALGO_DIR

0 commit comments

Comments
 (0)