-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
29 lines (19 loc) · 981 Bytes
/
Dockerfile
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
FROM python:3.12-slim-bookworm
# The installer requires curl (and certificates) to download the release archive
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh
# Run the installer then remove it
RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.cargo/bin/:$PATH"
# Set the working directory
WORKDIR /usr/src/app
# Copy only the files necessary for installing dependencies
COPY pyproject.toml uv.lock README.md ./
# Copy the rest of your application files into the container
COPY ./code_assistant ./code_assistant
# Install the dependencies specified in `pyproject.toml` and `uv.lock`.
RUN uv sync
# Specify the command to run your application
CMD ["uv", "run", "uvicorn", "code_assistant.main:app", "--host", "0.0.0.0", "--port", "5001", "--workers", "2", "--timeout-keep-alive", "600"]