Skip to content

Commit

Permalink
Initial commit - 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokhozt committed Jan 11, 2022
0 parents commit 78af626
Show file tree
Hide file tree
Showing 21 changed files with 1,466 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
start_container.sh
39 changes: 39 additions & 0 deletions Dockerfile
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"]
51 changes: 51 additions & 0 deletions Jenkinsfile
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
}
Loading

0 comments on commit 78af626

Please sign in to comment.