Update Dockerfile
Browse files- Dockerfile +22 -4
Dockerfile
CHANGED
@@ -1,12 +1,30 @@
|
|
1 |
FROM ghcr.io/berriai/litellm:main-latest
|
2 |
|
3 |
-
# Set
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Copy the configuration file into the container at /app
|
7 |
-
COPY config.yaml .
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
EXPOSE 4000
|
10 |
|
11 |
#ENTRYPOINT ["litellm"]
|
12 |
-
CMD ["--port", "4000", "--config", "./config.yaml", "--num_workers", "1", "--telemetry", "False"]
|
|
|
1 |
FROM ghcr.io/berriai/litellm:main-latest
|
2 |
|
3 |
+
# Set up a new user named "user" with user ID 1000
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
# Switch to the "user" user
|
7 |
+
USER user
|
8 |
+
|
9 |
+
# Set home to the user's home directory
|
10 |
+
ENV HOME=/home/user \
|
11 |
+
PATH=/home/user/.local/bin:$PATH
|
12 |
+
|
13 |
+
# Set the working directory to the user's home directory
|
14 |
+
WORKDIR $HOME/app
|
15 |
+
|
16 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
17 |
+
COPY --chown=user . $HOME/app
|
18 |
|
19 |
# Copy the configuration file into the container at /app
|
20 |
+
#COPY --chown=user config.yaml .
|
21 |
+
|
22 |
+
# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
|
23 |
+
RUN pip install --no-cache-dir --upgrade pip
|
24 |
+
|
25 |
+
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
26 |
|
27 |
EXPOSE 4000
|
28 |
|
29 |
#ENTRYPOINT ["litellm"]
|
30 |
+
CMD ["--port", "4000", "--config", "./config.yaml", "--num_workers", "1", "--telemetry", "False", "--detailed_debug"]
|