Skip to content

Commit e88579d

Browse files
committed
fix(docker): Fix venv creation and PYTHONPATH warning
- Remove PYTHONPATH concatenation to fix undefined variable warning - Add --system-site-packages to venv creation for better compatibility - Properly activate venv before installing packages - Add setuptools and wheel to ensure build dependencies - This should fix the GitHub Actions build failure
1 parent 55b7fd7 commit e88579d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docker/api/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV TZ=UTC
99
# Python environment variables
1010
ENV PYTHONUNBUFFERED=1
1111
ENV PYTHONDONTWRITEBYTECODE=1
12-
ENV PYTHONPATH=/app/src/foamai-server:${PYTHONPATH}
12+
ENV PYTHONPATH=/app/src/foamai-server
1313

1414
# Install system dependencies
1515
RUN apt-get update && apt-get install -y \
@@ -45,10 +45,11 @@ COPY src/foamai-server/ ./src/foamai-server/
4545

4646
# Create virtual environment using system Python and install dependencies
4747
WORKDIR /app/src/foamai-server
48-
RUN python3 -m venv .venv && \
49-
.venv/bin/pip install --upgrade pip && \
50-
.venv/bin/pip install uv && \
51-
.venv/bin/uv pip install -e .
48+
RUN python3 -m venv .venv --system-site-packages && \
49+
. .venv/bin/activate && \
50+
pip install --upgrade pip setuptools wheel && \
51+
pip install uv && \
52+
uv pip install -e .
5253

5354
# Create necessary directories and set permissions
5455
RUN mkdir -p /data /tmp/foamai

0 commit comments

Comments
 (0)