httpsAkayush commited on
Commit
9686017
·
1 Parent(s): 675d7b4
Files changed (1) hide show
  1. Dockerfile +4 -9
Dockerfile CHANGED
@@ -1,22 +1,17 @@
1
  FROM python:3.9
2
 
3
- # Create a user with home directory
4
- RUN useradd -m -u 1000 user
5
- USER user
6
- ENV PATH="/home/user/.local/bin:$PATH"
7
-
8
  # Set working directory
9
  WORKDIR /app
10
 
11
  # Copy and install dependencies
12
- COPY --chown=user ./requirements.txt requirements.txt
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
  RUN pip install --no-cache-dir fastapi uvicorn python-multipart
15
 
16
- # Copy app code
17
- COPY --chown=user . /app
18
 
19
- # Expose the port (HF Spaces expects 7860)
20
  EXPOSE 7860
21
 
22
  # Start the FastAPI server
 
1
  FROM python:3.9
2
 
 
 
 
 
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
  # Copy and install dependencies
7
+ COPY requirements.txt .
8
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
9
  RUN pip install --no-cache-dir fastapi uvicorn python-multipart
10
 
11
+ # Copy the rest of the app
12
+ COPY . .
13
 
14
+ # Expose port (HF Spaces expects 7860)
15
  EXPOSE 7860
16
 
17
  # Start the FastAPI server