|
FROM python:3.9 |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
USER user |
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
WORKDIR / |
|
|
|
|
|
COPY --chown=user ./requirements/requirement.txt requirements/requirement.txt |
|
|
|
|
|
COPY --chown=user ./lib/aicloudlibs-0.1.0-py3-none-any.whl /lib/ |
|
COPY --chown=user ./lib/en_core_web_lg-3.7.1-py3-none-any.whl /lib/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade -r requirements/requirement.txt |
|
|
|
|
|
COPY --chown=user ./src /src |
|
COPY --chown=user ./config /config |
|
COPY --chown=user ./presidio_analyzer /presidio_analyzer |
|
COPY --chown=user ./lib /lib |
|
COPY --chown=user ./requirements /requirements |
|
|
|
|
|
ENV PYTHONPATH="/src:$PYTHONPATH" |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["uvicorn", "src.privacy_main:app", "--host", "0.0.0.0", "--port", "7860"] |