RoyAalekh commited on
Commit
a092586
·
1 Parent(s): cf7dd47

Refactor Dockerfile for dependency installation

Browse files

Updated the Dockerfile to streamline the installation of dependencies and changed the method for installing 'uv'.

Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,33 +1,31 @@
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 \
12
  PIP_DISABLE_PIP_VERSION_CHECK=1 \
13
  PYTHONPATH=/app
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
25
- # ----------------------------------------------------------
26
- RUN curl -LsSf https://astral.sh/uv/install.sh -o uv-installer.sh && \
27
- sh uv-installer.sh --install-dir /usr/local/bin && \
28
- rm uv-installer.sh
29
 
30
- # Check uv installation
31
  RUN uv --version
32
 
33
  EXPOSE 8501
 
1
  # syntax=docker/dockerfile:1
2
  FROM python:3.11-slim
3
 
 
4
  RUN apt-get update \
5
+ && apt-get install -y --no-install-recommends curl unzip libgomp1 \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ WORKDIR /app
9
+
10
  ENV PYTHONDONTWRITEBYTECODE=1 \
11
  PYTHONUNBUFFERED=1 \
12
  PIP_NO_CACHE_DIR=1 \
13
  PIP_DISABLE_PIP_VERSION_CHECK=1 \
14
  PYTHONPATH=/app
15
 
 
 
16
  COPY . .
17
 
 
18
  RUN pip install --upgrade pip setuptools wheel \
19
  && pip install .
20
 
21
+ # Install uv
22
+ RUN curl -L "https://github.com/astral-sh/uv/releases/latest/download/uv-x86_64-unknown-linux-gnu.tar.gz" \
23
+ -o uv.tar.gz \
24
+ && tar -xzf uv.tar.gz \
25
+ && mv uv /usr/local/bin/uv \
26
+ && rm uv.tar.gz
27
 
28
+ # Test uv works
29
  RUN uv --version
30
 
31
  EXPOSE 8501