vilarin commited on
Commit
ad2bcde
1 Parent(s): 5dbdf67

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ # Set up a new user named "user" with user ID 1000
7
+ RUN useradd -m -u 1000 user
8
+
9
+ # Switch to the "user" user
10
+ USER user
11
+
12
+ # Set home to the user's home directory
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
+
16
+ # Set the working directory to the user's home directory
17
+ WORKDIR $HOME/app
18
+
19
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
20
+ COPY --chown=user . $HOME/app
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", "--config", "config.yaml", "--port", "4000", "--run_gunicorn"]