Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ WORKDIR /app
## Install dependencies (including required libraries)
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 build-essential cmake git && rm -rf /var/lib/apt/lists/*

# Copy dependency descriptors
COPY pyproject.toml requirements.txt /app/
# Copy dependency descriptors and constraints used by both pip resolvers.
COPY pyproject.toml requirements.txt constraints.txt /app/

# Copy the app
COPY tools /app/tools

# Install Python dependencies without pip cache
RUN pip install --no-cache-dir .
# PIP_BUILD_CONSTRAINT is supported by pip 26.2 and newer.
RUN python -m pip install --no-cache-dir --upgrade "pip>=26.2"

# Apply the constraint to normal and isolated dependency resolution.
RUN PIP_CONSTRAINT=/app/constraints.txt \
PIP_BUILD_CONSTRAINT=/app/constraints.txt \
python -m pip install --no-cache-dir .

## Create non-root user and set ownership of the working directory
RUN adduser --disabled-password --gecos "" --no-create-home non-root && \
Expand Down
2 changes: 1 addition & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
setuptools<82
setuptools>=78.1.1,<82
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
setuptools>=78.1.1,<82 # vendored YOLOv6 and YOLOv7 import pkg_resources
torch>=2.0.0 #,<2.6.0
torchvision>=0.10.1
Pillow>=7.1.2
Expand Down
Loading