42 lines
1.3 KiB
Docker
42 lines
1.3 KiB
Docker
FROM python:3.8
|
|
|
|
ARG USERNAME
|
|
ARG TOKEN
|
|
ARG PYPI_REGISTRY_RESEARCH=https://gitlab.knecon.com/api/v4/groups/19/-/packages/pypi
|
|
ARG POETRY_SOURCE_REF_RESEARCH=gitlab-research
|
|
ARG PYPI_REGISTRY_RED=https://gitlab.knecon.com/api/v4/groups/12/-/packages/pypi
|
|
ARG POETRY_SOURCE_REF_RED=gitlab-red
|
|
ARG VERSION=dev
|
|
|
|
LABEL maintainer="Research <research@knecon.com>"
|
|
LABEL version="${VERSION}"
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=true
|
|
ENV POETRY_HOME=/opt/poetry
|
|
ENV PATH="$POETRY_HOME/bin:$PATH"
|
|
|
|
RUN curl -sSL https://install.python-poetry.org | python3 -
|
|
|
|
COPY ./data ./data
|
|
COPY ./cv_analysis ./cv_analysis
|
|
COPY ./scripts ./scripts
|
|
COPY pyproject.toml poetry.lock ./src ./
|
|
|
|
RUN ls -hal
|
|
RUN echo "${USERNAME} ${TOKEN} ${PYPI_REGISTRY_RED} ${POETRY_SOURCE_REF_RED} "
|
|
|
|
RUN poetry config virtualenvs.create false && \
|
|
poetry config installer.max-workers 10 && \
|
|
poetry config repositories.${POETRY_SOURCE_REF_RESEARCH} ${PYPI_REGISTRY_RESEARCH} && \
|
|
poetry config http-basic.${POETRY_SOURCE_REF_RESEARCH} ${USERNAME} ${TOKEN} && \
|
|
poetry config repositories.${POETRY_SOURCE_REF_RED} ${PYPI_REGISTRY_RED} && \
|
|
poetry config http-basic.${POETRY_SOURCE_REF_RED} ${USERNAME} ${TOKEN} && \
|
|
poetry install --without=test -vv --no-interaction --no-root
|
|
|
|
EXPOSE 5000
|
|
EXPOSE 8080
|
|
|
|
CMD [ "python", "serve.py"]
|