RoyAalekh commited on
Commit
f944cba
·
1 Parent(s): d744329

Refactor Dockerfile to install uv globally

Browse files

Updated Dockerfile to install uv system-wide and verify installation.

Files changed (1) hide show
  1. Dockerfile +10 -8
Dockerfile CHANGED
@@ -1,12 +1,11 @@
1
  # syntax=docker/dockerfile:1
2
  FROM python:3.11-slim
3
 
4
- # Install system deps (including curl for uv installer)
5
  RUN apt-get update \
6
- && apt-get install -y --no-install-recommends libgomp1 curl \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
- # Python env hygiene
10
  ENV PYTHONDONTWRITEBYTECODE=1 \
11
  PYTHONUNBUFFERED=1 \
12
  PIP_NO_CACHE_DIR=1 \
@@ -15,18 +14,21 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
15
 
16
  WORKDIR /app
17
 
18
- # Copy repo
19
  COPY . .
20
 
21
  # Install Python package
22
  RUN pip install --upgrade pip setuptools wheel \
23
  && pip install .
24
 
25
- # Install uv
26
- RUN curl -fsSL https://astral.sh/uv/install.sh | sh
 
 
 
 
27
 
28
- # Add uv to PATH so CMD can find it
29
- ENV PATH="/root/.local/bin:/root/.cargo/bin:${PATH}"
30
 
31
  EXPOSE 8501
32
 
 
1
  # syntax=docker/dockerfile:1
2
  FROM python:3.11-slim
3
 
4
+ # Install system deps
5
  RUN apt-get update \
6
+ && apt-get install -y --no-install-recommends libgomp1 curl unzip \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  ENV PYTHONDONTWRITEBYTECODE=1 \
10
  PYTHONUNBUFFERED=1 \
11
  PIP_NO_CACHE_DIR=1 \
 
14
 
15
  WORKDIR /app
16
 
 
17
  COPY . .
18
 
19
  # Install Python package
20
  RUN pip install --upgrade pip setuptools wheel \
21
  && pip install .
22
 
23
+ # ----------------------------------------------------------
24
+ # Install uv system-wide (NOT into /root/.cargo/bin)
25
+ # ----------------------------------------------------------
26
+ RUN curl -LsSf https://astral.sh/uv/install.sh -o uv-installer.sh && \
27
+ sh uv-installer.sh --yes --install-dir /usr/local/bin && \
28
+ rm uv-installer.sh
29
 
30
+ # Check uv installation
31
+ RUN uv --version
32
 
33
  EXPOSE 8501
34