-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathDockerfile.ray
More file actions
55 lines (43 loc) · 1.22 KB
/
Dockerfile.ray
File metadata and controls
55 lines (43 loc) · 1.22 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM python:3.12-slim
# Installer curl
RUN apt-get update && apt-get install -y curl && apt-get clean
RUN apt-get update && apt-get install -y git && apt-get clean
RUN apt-get update && apt-get install -y iputils-ping
RUN apt-get update && apt-get install -y \
build-essential \
g++ \
gcc \
cmake \
make \
ssh \
rsync \
wget \
libpq-dev python3-dev \
&& rm -rf /var/lib/apt/lists/*
# install ffmpeg
RUN apt update && \
apt install -y ffmpeg
# Set environment variables for Hugging Face cache location
ENV XDG_CACHE_HOME=${XDG_CACHE_HOME:-/app/model_weights}
ENV HF_HOME=${HF_HOME:-/app/model_weights}
ENV HF_HOME=/app/model_weights
ENV HF_HUB_CACHE=${HF_HUB_CACHE:-/app/model_weights/hub}
# Set workdir for uv
WORKDIR /app
# Install uv & setup venv
COPY pyproject.toml uv.lock ./
RUN pip3 install uv && \
uv python install 3.12.7 && \
uv python pin 3.12.7
# && \uv sync --no-dev
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Set workdir for source code
WORKDIR /app/openrag
# Copy source code
COPY openrag/ .
# Copy assets and config
COPY prompts/ /app/prompts/
COPY conf/ /app/conf/
RUN ln -s /app/.venv/bin/ray /usr/local/bin/ray
ENV PYTHONPATH=/app/openrag/