Spaces:
Running
Running
Incorporating detectron2 installation into the build
#2
by
alrichardbollans
- opened
detectron2 is installed when the app is started -- I wonder if there's a way to incorporate this into the build instead?
Maybe this would require the docker SDK rather than Gradio?
Using a docker build for shiny, I've managed to get this working with dockerfile:
FROM docker.io/library/python:3.10@sha256:0a886c151ca7a5deffce7ec5c8b519e75cf238274232119d9d791dc22b0d0fd3
RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN pip install --no-cache-dir pip -U && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf_xet>=1.0.0,<2.0.0" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
RUN pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git
COPY . .
EXPOSE 7860
CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
and requirements:
faicons
shiny
shinywidgets
plotly
pandas
ridgeplot
opencv-python-headless
pyyaml==5.1
torch
torchvision
ninja
alrichardbollans
changed discussion status to
closed