-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #661 from roboflow/florence2-workflows-block
Florence2 workflows block
- Loading branch information
Showing
22 changed files
with
1,942 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
FROM nvcr.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 as base | ||
|
||
WORKDIR /app | ||
|
||
RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
ffmpeg \ | ||
libxext6 \ | ||
libopencv-dev \ | ||
uvicorn \ | ||
python3-pip \ | ||
git \ | ||
libgdal-dev \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY requirements/requirements.sam.txt \ | ||
requirements/requirements.clip.txt \ | ||
requirements/requirements.http.txt \ | ||
requirements/requirements.gpu.txt \ | ||
requirements/requirements.waf.txt \ | ||
requirements/requirements.gaze.txt \ | ||
requirements/requirements.doctr.txt \ | ||
requirements/requirements.groundingdino.txt \ | ||
requirements/requirements.cogvlm.txt \ | ||
requirements/requirements.yolo_world.txt \ | ||
requirements/_requirements.txt \ | ||
requirements/requirements.transformers.txt \ | ||
requirements/requirements.pali.flash_attn.txt \ | ||
requirements/requirements.sdk.http.txt \ | ||
requirements/requirements.cli.txt \ | ||
./ | ||
|
||
RUN python3 -m pip install -U pip | ||
RUN python3 -m pip install --extra-index-url https://download.pytorch.org/whl/cu118 \ | ||
-r _requirements.txt \ | ||
-r requirements.sam.txt \ | ||
-r requirements.clip.txt \ | ||
-r requirements.http.txt \ | ||
-r requirements.gpu.txt \ | ||
-r requirements.waf.txt \ | ||
-r requirements.gaze.txt \ | ||
-r requirements.groundingdino.txt \ | ||
-r requirements.doctr.txt \ | ||
-r requirements.cogvlm.txt \ | ||
-r requirements.yolo_world.txt \ | ||
-r requirements.transformers.txt \ | ||
-r requirements.sdk.http.txt \ | ||
-r requirements.cli.txt \ | ||
jupyterlab \ | ||
--upgrade \ | ||
&& rm -rf ~/.cache/pip | ||
|
||
# Install setup.py requirements for flash_attn | ||
RUN python3 -m pip install packaging==24.1 && rm -rf ~/.cache/pip | ||
|
||
# Install flash_attn required for Paligemma and Florence2 | ||
RUN python3 -m pip install -r requirements.pali.flash_attn.txt --no-build-isolation && rm -rf ~/.cache/pip | ||
|
||
FROM scratch | ||
COPY --from=base / / | ||
|
||
WORKDIR /app/ | ||
COPY inference inference | ||
COPY inference_sdk inference_sdk | ||
COPY inference_cli inference_cli | ||
ENV PYTHONPATH=/app/ | ||
COPY docker/config/gpu_http.py gpu_http.py | ||
|
||
ENV PYTHONPATH=/app/ | ||
ENV VERSION_CHECK_MODE=continuous | ||
ENV PROJECT=roboflow-platform | ||
ENV NUM_WORKERS=1 | ||
ENV HOST=0.0.0.0 | ||
ENV PORT=9001 | ||
ENV WORKFLOWS_STEP_EXECUTION_MODE=local | ||
ENV WORKFLOWS_MAX_CONCURRENT_STEPS=1 | ||
ENV API_LOGGING_ENABLED=True | ||
ENV LMM_ENABLED=True | ||
ENV CORE_MODEL_SAM2_ENABLED=True | ||
ENV CORE_MODEL_OWLV2_ENABLED=True | ||
|
||
ENTRYPOINT uvicorn gpu_http:app --workers $NUM_WORKERS --host $HOST --port $PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "0.19.0" | ||
__version__ = "0.20.0" | ||
|
||
|
||
if __name__ == "__main__": | ||
|
Oops, something went wrong.