Dataset-image-annotator

Latest version: v0.0.27

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.1

===========

- Initial commit


FROM python:3.11-slim as build-image

WORKDIR /usr/local/app
COPY src/dataset_image_annotator/db/migrations ./migrations/
COPY src/dataset_image_annotator/db/alembic.ini ./alembic.ini

RUN apt-get update
RUN apt-get install -y curl ca-certificates gnupg
RUN curl -fSsL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql.gpg > /dev/null
RUN apt-get update

RUN apt-get install -y gcc g++ make postgresql-server-dev-all libpq-dev libffi-dev git cargo

RUN export APP_HOME=/usr/local/app \
&& (cd $APP_HOME \
&& python3 -m venv venv \
&& . venv/bin/activate \
&& python3 -m pip install -U pip \
&& python3 -m pip install -U setuptools \
&& python3 -m pip install -U wheel \
&& python3 -m pip install -U uvloop \
&& python3 -m pip install -U dataset_image_annotator[web])


FROM python:3.11-slim

ENV PYTHONPATH=/usr/local/app

COPY --from=build-image /usr/share/keyrings/ /usr/share/keyrings/
RUN mkdir -p /usr/local/app \
&& apt-get update \
&& apt-get install -y libpq-dev

WORKDIR /usr/local/app

COPY --from=build-image /usr/local/app/ ./

RUN groupadd -r appgroup \
&& useradd -r -G appgroup -d /home/appuser appuser \
&& install -d -o appuser -g appgroup /usr/local/app/logs

USER appuser

EXPOSE 8080


CMD ["/usr/local/app/venv/bin/python3", "-m", "uvicorn", "dataset_image_annotator.api.http:app", \
"--host", "0.0.0.0", "--port", "8080"]

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.