Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- 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
|
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
|
|
|
|
|
17 |
|
18 |
-
# Copy
|
19 |
COPY --chown=user . .
|
20 |
|
21 |
-
# Expose
|
22 |
EXPOSE 7860
|
23 |
|
24 |
-
#
|
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"]
|
|