cccc
Browse files- Dockerfile +13 -10
- requirements.txt +4 -0
Dockerfile
CHANGED
@@ -1,16 +1,19 @@
|
|
1 |
-
#
|
2 |
-
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
|
|
|
|
|
|
|
|
|
10 |
WORKDIR /app
|
|
|
11 |
|
12 |
-
COPY --chown=
|
13 |
-
|
14 |
|
15 |
-
COPY --chown=user . /app
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM cgr.dev/chainguard/python:3.12 # Specific version, not dev variant
|
|
|
2 |
|
3 |
+
# Multi-stage for build dependencies
|
4 |
+
FROM cgr.dev/chainguard/python:3.12-dev as builder
|
5 |
+
WORKDIR /app
|
6 |
+
COPY requirements.txt .
|
7 |
+
RUN pip install --user --no-cache-dir -r requirements.txt
|
8 |
|
9 |
+
# Production stage
|
10 |
+
FROM cgr.dev/chainguard/python:3.12
|
11 |
+
RUN adduser -D -u 1000 litellm
|
12 |
+
USER litellm
|
13 |
WORKDIR /app
|
14 |
+
ENV PATH="/home/litellm/.local/bin:$PATH"
|
15 |
|
16 |
+
COPY --from=builder --chown=litellm:litellm /root/.local /home/litellm/.local
|
17 |
+
COPY --chown=litellm:litellm . /app
|
18 |
|
|
|
19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -1,2 +1,6 @@
|
|
1 |
fastapi
|
2 |
uvicorn[standard]
|
|
|
|
|
|
|
|
|
|
1 |
fastapi
|
2 |
uvicorn[standard]
|
3 |
+
litellm[proxy]==1.57.3 # Specify the litellm version you want to use
|
4 |
+
prometheus_client
|
5 |
+
langfuse
|
6 |
+
prisma
|