beaupreda's picture
Upload sensAI-Generic-Object-Detection with upload_repo.py
86778a6 verified
Raw
History Blame Contribute Delete
1.03 kB
# syntax=docker/dockerfile:1
FROM python:3.11
RUN apt-get update && apt-get install -y ffmpeg libopenblas-dev libopencv-dev qt6-base-dev qt6-multimedia-dev libssl-dev mesa-opencl-icd libboost-all-dev libturbojpeg0-dev ocl-icd-opencl-dev clinfo ocl-icd-libopencl1 && rm -rf /var/lib/apt/lists
ARG HF_TOKEN=""
RUN pip install --no-cache-dir huggingface-hub
COPY install_eve.py /tmp/install_eve.py
RUN --mount=type=secret,id=MODEL_ACCESS_TOKEN \
HF_TOKEN="$HF_TOKEN" python /tmp/install_eve.py && rm /tmp/install_eve.py
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# install_eve.py (above, as root) fetched the gated MOD weights here.
ENV MOD_MODELS_DIR="/opt/eve-models"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN mkdir -p /home/user/.config
COPY --chown=user . /app
RUN --mount=type=secret,id=MODEL_ACCESS_TOKEN,uid=1000 \
HF_TOKEN="$HF_TOKEN" python download_examples.py
CMD ["python", "app.py"]