Skip to content

Commit c45970d

Browse files
committed
Fixed dockerfile python envirenment issue
1 parent c928055 commit c45970d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ RUN addgroup -g 1000 app && adduser -u 1000 -G app -s /bin/sh -D app
3939
WORKDIR /app
4040

4141
# Copy the virtual environment from the uv stage
42-
COPY --from=uv --chown=app:app /app/.venv /app/.venv
42+
COPY --from=uv /app/.venv /app/.venv
4343

4444
# Copy the source code (needed for non-editable installs)
45-
COPY --from=uv --chown=app:app /app/src /app/src
45+
COPY --from=uv /app/src /app/src
46+
47+
# Fix broken Python symlinks from uv stage - point to system Python
48+
RUN rm -f /app/.venv/bin/python* && \
49+
ln -s /usr/local/bin/python3 /app/.venv/bin/python && \
50+
ln -s /usr/local/bin/python3 /app/.venv/bin/python3 && \
51+
ln -s /usr/local/bin/python3 /app/.venv/bin/python3.13 && \
52+
chown -R app:app /app
4653

4754
# Place executables in the environment at the front of the path
4855
ENV PATH="/app/.venv/bin:$PATH"

0 commit comments

Comments
 (0)