Estherrr777 commited on
Commit
e9de28d
·
verified ·
1 Parent(s): b85a70f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -1,15 +1,20 @@
 
1
  FROM python:3.10
2
 
 
3
  RUN useradd -m -u 1000 user
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
6
 
 
7
  WORKDIR /app
8
 
9
- COPY --chown=user ./backend/requirements.txt ./backend/requirements.txt
10
- RUN pip install --no-cache-dir -r ./backend/requirements.txt
 
11
 
 
12
  COPY --chown=user . .
13
 
14
- CMD ["uvicorn", "backend/app/main:app", "--host", "0.0.0.0", "--port", "7860"]
15
-
 
1
+ # Use Python base
2
  FROM python:3.10
3
 
4
+ # Set up user
5
  RUN useradd -m -u 1000 user
6
  USER user
7
  ENV PATH="/home/user/.local/bin:$PATH"
8
 
9
+ # Set work directory
10
  WORKDIR /app
11
 
12
+ # Install backend dependencies
13
+ COPY --chown=user backend/requirements.txt ./requirements.txt
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy the entire project
17
  COPY --chown=user . .
18
 
19
+ # IMPORTANT: Use dot notation, not slashes
20
+ CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]