Skip to content

Commit 5cbae6b

Browse files
fix: reorder ARG declaration and improve readability in Dockerfile.API
1 parent ca5a01c commit 5cbae6b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

backend/Dockerfile.API

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
## docker run --env-file .env --rm -p 8000:8000 -v $(pwd):/app/code --name fair-api-container fair-api
66

7-
ARG BUILD_TARGET=api
8-
97
## in order to access localhost port to your system from docker env you might wanna use : host.docker.internal or ip
108
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS builder
119

10+
ARG BUILD_TARGET=api
11+
1212
# Configure uv settings
1313
ENV UV_COMPILE_BYTECODE=1
1414
ENV UV_LINK_MODE=copy
@@ -31,10 +31,18 @@ WORKDIR /app
3131
COPY pyproject.toml uv.lock manage.py /app/
3232

3333
RUN --mount=type=cache,target=/root/.cache/uv \
34+
echo "Supplied BUILD_TARGET: $BUILD_TARGET" && \
3435
if [ "$BUILD_TARGET" = "predictor" ]; then \
35-
uv sync --frozen --no-install-project --no-dev --group prediction-workers; \
36+
uv sync \
37+
--frozen \
38+
--no-install-project \
39+
--no-dev \
40+
--group prediction-workers; \
3641
else \
37-
uv sync --frozen --no-install-project --no-dev; \
42+
uv sync \
43+
--frozen \
44+
--no-install-project \
45+
--no-dev; \
3846
fi
3947

4048
COPY aiproject /app/aiproject

0 commit comments

Comments
 (0)