NandanData commited on
Commit
67c794b
·
verified ·
1 Parent(s): cf75792

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python image
2
+ FROM python:3.12-slim
3
+
4
+ # Set up a new user to avoid permission issues
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH
9
+
10
+ # Set the working directory
11
+ WORKDIR $HOME/app
12
+
13
+ # Install dependencies
14
+ COPY --chown=user requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy app code
18
+ COPY --chown=user . .
19
+
20
+ # Expose the app on port 7860 (as specified in README)
21
+ EXPOSE 7860
22
+
23
+ # Command to run the app
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]