Spaces:
Sleeping
Sleeping
File size: 932 Bytes
dbaa71b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# This is Docker file to Obsei SDK with dependencies installed
FROM python:3.10-slim-bullseye
RUN useradd --create-home user
WORKDIR /home/user
# env variable
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PIP_NO_CACHE_DIR 1
ENV WORKFLOW_SCRIPT '/home/user/obsei/process_workflow.py'
ENV OBSEI_CONFIG_PATH ""
ENV OBSEI_CONFIG_FILENAME ""
# Hack to install jre on debian
RUN mkdir -p /usr/share/man/man1
# install few required tools
RUN apt-get update && apt-get install -y --no-install-recommends curl git pkg-config cmake libncurses5 g++ \
&& apt-get clean autoclean && apt-get autoremove -y \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# install as a package
COPY pyproject.toml README.md /home/user/
RUN pip install --upgrade pip
# copy README
COPY README.md /home/user/
# copy code
COPY obsei /home/user/obsei
RUN pip install -e .[all]
USER user
# cmd for running the API
CMD ["sh", "-c", "python ${WORKFLOW_SCRIPT}"]
|