-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.12-slim-bullseye AS focoos-cpu
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
LABEL authors="focoos.ai"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential git ffmpeg libsm6 libxext6 gcc libmagic1 wget make cmake
WORKDIR /app
COPY focoos ./focoos
COPY pyproject.toml ./pyproject.toml
RUN uv pip install --system -e .[cpu]
FROM ghcr.io/focoosai/deeplearning:base-cu12-cudnn9-py312-uv AS focoos-cuda
LABEL authors="focoos.ai"
WORKDIR /app
COPY focoos ./focoos
COPY pyproject.toml ./pyproject.toml
RUN uv pip install --system -e .[cuda]
FROM focoos-cuda AS focoos-torch
RUN uv pip install --system -e .[torch]
FROM focoos-torch AS focoos-tensorrt
RUN apt-get update && apt-get install -y \
wget lsb-release && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
apt-get update && apt-get install -y \
tensorrt \
python3-libnvinfer-dev \
uff-converter-tf && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN uv pip install --system -e .[tensorrt]