-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 737 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (23 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set environment variables to prevent Python from buffering stdout/stderr
ENV PYTHONUNBUFFERED=1
# Install curl and needed dependencies
RUN apt-get update && apt-get install -y curl
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH
ENV PATH="/root/.local/bin:$PATH"
# Set the working directory in the container
WORKDIR /app
# Copy the local script into the container
COPY . /app
# Install dependencies using uv
RUN uv venv
ENV PATH="/app/.venv/bin:$PATH"
RUN uv pip install pip
RUN uv pip install -e .
ARG BUILD_COMMIT="unknown"
ARG BUILD_BRANCH="main"
ENV BUILD_COMMIT=${BUILD_COMMIT} \
BUILD_BRANCH=${BUILD_BRANCH}