amaye15 commited on
Commit
a4faf54
·
1 Parent(s): c50b85f

Debug - UV

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -56,7 +56,7 @@ FROM python:3.12-slim as builder
56
  # Set environment variables
57
  ENV PYTHONDONTWRITEBYTECODE=1 \
58
  PYTHONUNBUFFERED=1 \
59
- PATH="/opt/venv/bin:$PATH"
60
 
61
  # Install system dependencies (curl and ca-certificates for uv installer)
62
  RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -67,6 +67,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
67
  # Install uv using the official installer
68
  RUN curl -sSfL https://astral.sh/uv/install.sh | sh
69
 
 
 
 
70
  # Create a non-root user
71
  RUN useradd -m -u 1000 user
72
 
@@ -76,6 +79,9 @@ WORKDIR /app
76
  # Create a virtual environment
77
  RUN uv venv /opt/venv
78
 
 
 
 
79
  # Copy only the requirements file first to leverage Docker cache
80
  COPY --chown=user ./requirements.txt /app/requirements.txt
81
 
 
56
  # Set environment variables
57
  ENV PYTHONDONTWRITEBYTECODE=1 \
58
  PYTHONUNBUFFERED=1 \
59
+ PATH="/root/.local/bin:$PATH"
60
 
61
  # Install system dependencies (curl and ca-certificates for uv installer)
62
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
67
  # Install uv using the official installer
68
  RUN curl -sSfL https://astral.sh/uv/install.sh | sh
69
 
70
+ # Verify uv is installed and available
71
+ RUN uv --version
72
+
73
  # Create a non-root user
74
  RUN useradd -m -u 1000 user
75
 
 
79
  # Create a virtual environment
80
  RUN uv venv /opt/venv
81
 
82
+ # Update PATH to include the virtual environment's bin directory
83
+ ENV PATH="/opt/venv/bin:$PATH"
84
+
85
  # Copy only the requirements file first to leverage Docker cache
86
  COPY --chown=user ./requirements.txt /app/requirements.txt
87