NandanData commited on
Commit
dfd2213
·
verified ·
1 Parent(s): 7071ff4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -21
Dockerfile CHANGED
@@ -1,28 +1,9 @@
1
- # Use official Python image
2
  FROM python:3.12-slim
3
 
4
- # Install system dependencies for pandas and other packages
5
  RUN apt-get update && \
6
  apt-get install -y gcc g++ libpq-dev python3-dev libffi-dev build-essential
7
 
8
- # Set up a new user to avoid permission issues
9
- RUN useradd -m -u 1000 user
10
- USER user
11
- ENV HOME=/home/user \
12
- PATH=/home/user/.local/bin:$PATH
13
-
14
- # Set the working directory
15
- WORKDIR $HOME/app
16
-
17
- # Install dependencies
18
  COPY --chown=user requirements.txt .
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Copy app code
22
- COPY --chown=user . .
23
-
24
- # Expose the app on port 7860
25
- EXPOSE 7860
26
 
27
- # Command to run the app
28
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.12-slim
2
 
 
3
  RUN apt-get update && \
4
  apt-get install -y gcc g++ libpq-dev python3-dev libffi-dev build-essential
5
 
6
+ WORKDIR /home/user/app
 
 
 
 
 
 
 
 
 
7
  COPY --chown=user requirements.txt .
 
 
 
 
 
 
 
8
 
9
+ RUN pip install --no-cache-dir -r requirements.txt