-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78af626
Showing
21 changed files
with
1,466 additions
and
0 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 @@ | ||
start_container.sh |
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,39 @@ | ||
FROM python:3.8 | ||
LABEL maintainer="[email protected], [email protected]" | ||
ENV PYTHONUNBUFFERED TRUE | ||
|
||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
g++ \ | ||
openjdk-11-jre-headless \ | ||
curl \ | ||
wget | ||
|
||
# Rust compiler for tokenizers | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# Python dependencies | ||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Supervisor | ||
COPY celery_app /usr/src/app/celery_app | ||
COPY http_server /usr/src/app/http_server | ||
COPY document /usr/src/app/document | ||
COPY punctuation /usr/src/app/punctuation | ||
RUN mkdir /usr/src/app/model-store | ||
RUN mkdir -p /usr/src/app/tmp | ||
COPY config.properties /usr/src/app/config.properties | ||
|
||
COPY docker-entrypoint.sh wait-for-it.sh healthcheck.sh ./ | ||
|
||
ENV PYTHONPATH="${PYTHONPATH}:/usr/src/app/punctuation" | ||
HEALTHCHECK CMD ./healthcheck.sh | ||
|
||
ENV TEMP=/usr/src/app/tmp | ||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["serve"] |
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,51 @@ | ||
pipeline { | ||
agent any | ||
environment { | ||
DOCKER_HUB_REPO = "lintoai/linto-platform-punctuation" | ||
DOCKER_HUB_CRED = 'docker-hub-credentials' | ||
|
||
VERSION = '' | ||
} | ||
|
||
stages{ | ||
stage('Docker build for master branch'){ | ||
when{ | ||
branch 'master' | ||
} | ||
steps { | ||
echo 'Publishing latest' | ||
script { | ||
image = docker.build(env.DOCKER_HUB_REPO) | ||
VERSION = sh( | ||
returnStdout: true, | ||
script: "awk -v RS='' '/#/ {print; exit}' RELEASE.md | head -1 | sed 's/#//' | sed 's/ //'" | ||
).trim() | ||
|
||
docker.withRegistry('https://registry.hub.docker.com', env.DOCKER_HUB_CRED) { | ||
image.push("${VERSION}") | ||
image.push('latest') | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('Docker build for next (unstable) branch'){ | ||
when{ | ||
branch 'next' | ||
} | ||
steps { | ||
echo 'Publishing unstable' | ||
script { | ||
image = docker.build(env.DOCKER_HUB_REPO) | ||
VERSION = sh( | ||
returnStdout: true, | ||
script: "awk -v RS='' '/#/ {print; exit}' RELEASE.md | head -1 | sed 's/#//' | sed 's/ //'" | ||
).trim() | ||
docker.withRegistry('https://registry.hub.docker.com', env.DOCKER_HUB_CRED) { | ||
image.push('latest-unstable') | ||
} | ||
} | ||
} | ||
} | ||
}// end stages | ||
} |
Oops, something went wrong.