Spaces:
Sleeping
Sleeping
Set PATH for uv in Dockerfile
Browse filesAdded environment variable for uv installation path.
- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -10,10 +10,13 @@ WORKDIR /app
|
|
| 10 |
# Install uv
|
| 11 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Create uv virtual environment
|
| 14 |
RUN uv venv /app/.venv
|
| 15 |
|
| 16 |
-
# Activate
|
| 17 |
ENV VIRTUAL_ENV=/app/.venv
|
| 18 |
ENV PATH="/app/.venv/bin:${PATH}"
|
| 19 |
|
|
@@ -22,11 +25,9 @@ ENV PYTHONPATH="/app"
|
|
| 22 |
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
-
# Install project + dependencies into venv
|
| 26 |
RUN uv pip install --upgrade pip setuptools wheel \
|
| 27 |
&& uv pip install .
|
| 28 |
|
| 29 |
-
# Debug info
|
| 30 |
RUN uv --version \
|
| 31 |
&& which uv \
|
| 32 |
&& which python \
|
|
|
|
| 10 |
# Install uv
|
| 11 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 12 |
|
| 13 |
+
# Make uv visible to shell
|
| 14 |
+
ENV PATH="/root/.local/bin:${PATH}"
|
| 15 |
+
|
| 16 |
# Create uv virtual environment
|
| 17 |
RUN uv venv /app/.venv
|
| 18 |
|
| 19 |
+
# Activate venv for rest of image
|
| 20 |
ENV VIRTUAL_ENV=/app/.venv
|
| 21 |
ENV PATH="/app/.venv/bin:${PATH}"
|
| 22 |
|
|
|
|
| 25 |
|
| 26 |
COPY . .
|
| 27 |
|
|
|
|
| 28 |
RUN uv pip install --upgrade pip setuptools wheel \
|
| 29 |
&& uv pip install .
|
| 30 |
|
|
|
|
| 31 |
RUN uv --version \
|
| 32 |
&& which uv \
|
| 33 |
&& which python \
|