Spaces:
Sleeping
Sleeping
Commit ·
a24fc57
1
Parent(s): 2d60193
Fix Docker
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -10,7 +10,6 @@ RUN npm run build
|
|
| 10 |
FROM python:3.10
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
-
# Create a user to avoid permission issues on HF
|
| 14 |
RUN useradd -m -u 1000 user
|
| 15 |
USER user
|
| 16 |
ENV PATH="/home/user/.local/bin:${PATH}"
|
|
@@ -18,9 +17,9 @@ ENV PATH="/home/user/.local/bin:${PATH}"
|
|
| 18 |
COPY --chown=user requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
COPY --chown=user
|
| 23 |
COPY --chown=user --from=build-stage /frontend/dist ./dist
|
| 24 |
|
| 25 |
-
#
|
| 26 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 10 |
FROM python:3.10
|
| 11 |
WORKDIR /app
|
| 12 |
|
|
|
|
| 13 |
RUN useradd -m -u 1000 user
|
| 14 |
USER user
|
| 15 |
ENV PATH="/home/user/.local/bin:${PATH}"
|
|
|
|
| 17 |
COPY --chown=user requirements.txt .
|
| 18 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 19 |
|
| 20 |
+
# FIX 1: Change 'neuron.py' or 'app.py' to 'main.py'
|
| 21 |
+
COPY --chown=user main.py .
|
| 22 |
COPY --chown=user --from=build-stage /frontend/dist ./dist
|
| 23 |
|
| 24 |
+
# FIX 2: Change the entry point to 'main:app'
|
| 25 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|