Commit 80980d1f authored by ymir's avatar ymir

review deploy script

parent f159936a
Pipeline #105202 passed with stages
in 2 minutes and 46 seconds
......@@ -10,7 +10,7 @@ test: # this block can be copied/past/renamed if you split tests on different bl
stage: test
script:
# install requirements
- apt-get install -y pylint python3 python3-pip python3-numpy python3-psutil
- apt-get install -y pylint python3 python3-pip python3-numpy python3-psutil python3-requests
# - pip3 install --upgrade pip
- pip3 install --extra-index-url http://91.121.9.53:81/archive --trusted-host 91.121.9.53 pythoncommontools neuralnetworkcommon
# setup, minimal UT
......
......@@ -5,7 +5,7 @@ set -xe
# upgrade system
apt-get update -y ; apt-get upgrade -y -q ; apt-get dist-upgrade -y -q ; apt-get -y -q autoclean ; apt-get -y -q autoremove
# install required system
apt-get install -y python3 python3-pip python3-numpy python3-psutil
apt-get install -y python3 python3-pip python3-numpy python3-psutil python3-requests
# (un/re)install existing project & dependencies
pip3 uninstall -y neuralnetworktrainercli || echo 0
rm -Rf /root/.cache/pip/
......@@ -14,9 +14,6 @@ pip3 install --extra-index-url http://91.121.9.53:81/archive --trusted-host 91.1
# copy configuration file
mkdir -p /usr/local/lib/python3.6/dist-packages/neuralnetworktrainercli/conf
mv /tmp/neuralnetworktrainercli.conf /usr/local/lib/python3.6/dist-packages/neuralnetworktrainercli/conf
# add proxy configuration
LINE_NUMBER=`cat /etc/apache2/apache2.conf | grep /neuralnetwork/trainer | wc -l`
if [[ ${LINE_NUMBER} -eq 0 ]]; then
echo ProxyPass "/neuralnetwork/trainer" "http://localhost:5000/neuralnetwork/trainer" >> /etc/apache2/apache2.conf
service apache2 restart
fi
# set file as executable & reference in path
chmod +x /usr/local/lib/python3.6/dist-packages/neuralnetworktrainercli/neuralnetworktrainercli.py
ln -s /usr/local/lib/python3.6/dist-packages/neuralnetworktrainercli/neuralnetworktrainercli.py /usr/local/bin/neuralnetworktrainercli
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment