forked from shamantechnology/RedAGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 841 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (20 loc) · 841 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
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
&& chmod +x /usr/local/bin/dumb-init \
&& apt-get purge -y --auto-remove wget \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv
# Copy dependency manifests first to leverage Docker layer caching
COPY requirements.txt ./
RUN uv venv --python 3.11 /opt/venv \
&& uv pip install --python /opt/venv -r requirements.txt
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
# Copy the rest of your application code to the container
COPY . .
# Set the entry point for your application
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["python", "main.py"]