Estherrr777 commited on
Commit
333b86f
·
verified ·
1 Parent(s): 450ee46

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -8,19 +8,22 @@ ENV PATH="/home/user/.local/bin:$PATH"
8
  # Set working directory
9
  WORKDIR /app
10
 
11
- # Upgrade pip and install requirements cleanly
12
  COPY --chown=user backend/requirements.txt ./requirements.txt
 
 
13
  RUN pip install --upgrade pip && \
14
  pip uninstall -y transformers peft || true && \
15
  pip install --no-cache-dir -r requirements.txt && \
16
- pip install --no-cache-dir "transformers>=4.30.0" "peft>=0.5.0"
 
 
17
 
18
- # Copy the full project code (backend and data)
19
  COPY --chown=user . .
20
 
21
- # Expose default FastAPI port
22
  EXPOSE 7860
23
 
24
- # Run FastAPI app
25
  CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]
26
-
 
8
  # Set working directory
9
  WORKDIR /app
10
 
11
+ # Upgrade pip and install requirements
12
  COPY --chown=user backend/requirements.txt ./requirements.txt
13
+
14
+ # Force clean, fixed installs
15
  RUN pip install --upgrade pip && \
16
  pip uninstall -y transformers peft || true && \
17
  pip install --no-cache-dir -r requirements.txt && \
18
+ pip install --no-cache-dir \
19
+ transformers==4.31.0 \
20
+ peft==0.5.0
21
 
22
+ # Copy project code
23
  COPY --chown=user . .
24
 
25
+ # Expose FastAPI port
26
  EXPOSE 7860
27
 
28
+ # Start app
29
  CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]