forked from serengil/deepface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move code to src and add webapp files
- Loading branch information
Pei-Yun Sun
committed
Oct 19, 2020
1 parent
d3d3343
commit 3b4241f
Showing
177 changed files
with
523 additions
and
185 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#! groovy | ||
|
||
pipeline { | ||
|
||
agent { label 'MeG' } | ||
|
||
environment { | ||
DOCKER_PULL_REPO='repo.eresearch.unimelb.edu.au:8000' | ||
DOCKER_PUSH_REPO='repo.eresearch.unimelb.edu.au:8001' | ||
DOCKER_IMAGE_NAME="happypet/webapp" | ||
GPU_DOCKER_IMAGE_NAME="happypet/webapp-gpu" | ||
BASE_IMAGE_NAME="happypet/tensorflow" | ||
BASE_IMAGE_TAG="1.15.2-py3" | ||
GPU_BASE_IMAGE_TAG="1.15.2-gpu-py3" | ||
} | ||
|
||
stages { | ||
stage('Pull base image'){ | ||
steps { | ||
ansiColor('xterm') { | ||
script { | ||
docker.withRegistry("https://${env.DOCKER_PULL_REPO}",'repo-credentials') { | ||
script { | ||
docker.image("${env.BASE_IMAGE_NAME}:${env.BASE_IMAGE_TAG}").pull() | ||
docker.image("${env.BASE_IMAGE_NAME}:${env.GPU_BASE_IMAGE_TAG}").pull() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Build only'){ | ||
when { | ||
not { | ||
anyOf { | ||
branch 'master' | ||
branch 'develop' | ||
branch 'release' | ||
} | ||
} | ||
} | ||
steps { | ||
ansiColor('xterm') { | ||
script { | ||
def version = sh(returnStdout: true, script:'git describe --tags --always').trim() | ||
docker.withRegistry("https://${env.DOCKER_PUSH_REPO}",'repo-credentials') { | ||
script { | ||
docker.build("${env.DOCKER_IMAGE_NAME}:${version}",'-f docker/release/Dockerfile .') | ||
docker.build("${env.GPU_DOCKER_IMAGE_NAME}:${version}",'-f docker/release_gpu/Dockerfile .') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Build and Push'){ | ||
when { | ||
anyOf { | ||
branch 'master' | ||
branch 'develop' | ||
branch 'release' | ||
} | ||
} | ||
steps { | ||
ansiColor('xterm') { | ||
script { | ||
def version = sh(returnStdout: true, script:'git describe --tags --always').trim() | ||
docker.withRegistry("https://${env.DOCKER_PUSH_REPO}",'repo-credentials') { | ||
script { | ||
docker.build("${env.DOCKER_IMAGE_NAME}:${version}",'-f docker/release/Dockerfile .') | ||
.push() | ||
docker.build("${env.DOCKER_IMAGE_NAME}:latest",'-f docker/release/Dockerfile .') | ||
.push() | ||
docker.build("${env.GPU_DOCKER_IMAGE_NAME}:${version}",'-f docker/release_gpu/Dockerfile .') | ||
.push() | ||
docker.build("${env.GPU_DOCKER_IMAGE_NAME}:latest",'-f docker/release_gpu/Dockerfile .') | ||
.push() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Deploy'){ | ||
when { | ||
anyOf { | ||
branch 'master' | ||
branch 'develop' | ||
} | ||
} | ||
steps { | ||
ansiColor('xterm') { | ||
script { | ||
sshagent (credentials: ['960a6936-d2d3-4d24-b9bb-c19e33f467ed']) { | ||
sh "ssh -o StrictHostKeyChecking=no happypet-real-dev.eresearch.unimelb.edu.au" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/tensorflow:1.15.2-py3 \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-py3 \ | ||
-f docker/base_image/Dockerfile . | ||
|
||
DOCKER_BUILDKIT=1 docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/tensorflow:1.15.2-gpu-py3 \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-gpu-py3 \ | ||
-f docker/base_image_gpu/Dockerfile . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
GIT_VERSION=$(git describe --tags --always --long) | ||
|
||
docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp:$GIT_VERSION \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:$GIT_VERSION \ | ||
-t repo.eresearch.unimelb.edu.au:8001/happypet/webapp:latest \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/webapp:latest \ | ||
-f docker/release/Dockerfile . | ||
|
||
docker build -t repo.eresearch.unimelb.edu.au:8001/happypet/webapp-gpu:$GIT_VERSION \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/webapp-gpu:$GIT_VERSION \ | ||
-t repo.eresearch.unimelb.edu.au:8001/happypet/webapp-gpu:latest \ | ||
-t repo.eresearch.unimelb.edu.au:8000/happypet/webapp-gpu:latest \ | ||
-f docker/release_gpu/Dockerfile . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM tensorflow/tensorflow:1.15.2-py3 | ||
|
||
RUN apt-get update; \ | ||
apt-get install -qy libsm6 libxext6 libxrender-dev; \ | ||
pip install --upgrade pip; \ | ||
pip install --no-cache-dir cmake; \ | ||
pip install --no-cache-dir opencv-python; \ | ||
pip install --no-cache-dir dlib==19.19.0; \ | ||
pip install --no-cache-dir pandas==1.0.0; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV TZ=Australia/Melbourne |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM tensorflow/tensorflow:1.15.2-gpu-py3 | ||
|
||
RUN apt-get update; \ | ||
apt-get install -qy libsm6 libxext6 libxrender-dev; \ | ||
pip install --upgrade pip; \ | ||
pip install --no-cache-dir cmake; \ | ||
pip install --no-cache-dir opencv-python; \ | ||
pip install --no-cache-dir dlib==19.19.0; \ | ||
pip install --no-cache-dir pandas==1.0.0; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV TZ=Australia/Melbourne |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-py3 | ||
|
||
WORKDIR /app | ||
|
||
COPY ["./src", "requirements.txt", "./"] | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["python", "app.py"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM repo.eresearch.unimelb.edu.au:8000/happypet/tensorflow:1.15.2-gpu-py3 | ||
|
||
WORKDIR /app | ||
|
||
COPY ["./src", "requirements.txt", "./"] | ||
|
||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["python", "app.py"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,68 @@ | ||
numpy>=1.14.0 | ||
pandas>=0.23.4 | ||
gdown>=3.10.1 | ||
tqdm>=4.30.0 | ||
Pillow>=5.2.0 | ||
opencv-python>=3.4.4 | ||
tensorflow>=1.9.0 | ||
keras>=2.2.0 | ||
Flask>=1.1.2 | ||
mtcnn>=0.1.0 | ||
absl-py==0.9.0 | ||
astor==0.8.1 | ||
astunparse==1.6.3 | ||
cachetools==4.1.0 | ||
certifi==2020.4.5.1 | ||
chardet==3.0.4 | ||
Click==7.0 | ||
cycler==0.10.0 | ||
decorator==4.4.1 | ||
dlib==19.19.0 | ||
dnspython==2.0.0 | ||
face-recognition==1.2.3 | ||
face-recognition-models==0.3.0 | ||
Flask==1.1.1 | ||
flask-mongoengine==0.9.5 | ||
flask-restplus==0.13.0 | ||
gast==0.2.2 | ||
google-auth==1.14.1 | ||
google-auth-oauthlib==0.4.1 | ||
google-pasta==0.1.8 | ||
grpcio==1.26.0 | ||
gunicorn==20.0.4 | ||
h5py==2.10.0 | ||
idna==2.9 | ||
imageio==2.6.1 | ||
imutils==0.5.3 | ||
itsdangerous==1.1.0 | ||
Jinja2==2.11.1 | ||
joblib==0.14.1 | ||
Keras==2.1.5 | ||
Keras-Applications==1.0.8 | ||
Keras-Preprocessing==1.1.0 | ||
kiwisolver==1.1.0 | ||
Markdown==3.1.1 | ||
MarkupSafe==1.1.1 | ||
matplotlib==3.1.2 | ||
networkx==2.4 | ||
numpy==1.18.1 | ||
oauthlib==3.1.0 | ||
opencv-python==4.1.2.30 | ||
opt-einsum==3.1.0 | ||
pandas==1.0.0 | ||
Pillow==7.0.0 | ||
protobuf==3.11.2 | ||
pyasn1==0.4.8 | ||
pyasn1-modules==0.2.8 | ||
pyparsing==2.4.6 | ||
python-dateutil==2.8.1 | ||
pytz==2019.3 | ||
PyWavelets==1.1.1 | ||
PyYAML==5.3 | ||
requests==2.23.0 | ||
requests-oauthlib==1.3.0 | ||
rsa==4.0 | ||
scikit-image==0.16.2 | ||
scikit-learn==0.22.1 | ||
scipy==1.4.1 | ||
six==1.14.0 | ||
sklearn==0.0 | ||
tensorboard==1.15.0 | ||
tensorboard-plugin-wit==1.6.0.post3 | ||
tensorflow==1.15.0 | ||
tensorflow-estimator==1.15.1 | ||
termcolor==1.1.0 | ||
urllib3==1.25.9 | ||
Werkzeug==0.16.1 | ||
wrapt==1.11.2 | ||
wikipedia==1.4.0 |
File renamed without changes.
Oops, something went wrong.