Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -2,10 +2,12 @@ FROM python:3.12-slim
|
|
| 2 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
ARG CLASSIC_TOKEN
|
| 6 |
-
RUN git config --global url."https://x-access-token:${CLASSIC_TOKEN}@github.com/".insteadOf "https://github.com/"
|
| 7 |
-
|
| 8 |
COPY requirements.txt .
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
COPY . .
|
| 11 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
+
|
| 7 |
+
# Use the secret ARF_GITHUB_PAT during the pip install step
|
| 8 |
+
RUN --mount=type=secret,id=ARF_GITHUB_PAT \
|
| 9 |
+
git config --global url."https://x-access-token:$(cat /run/secrets/ARF_GITHUB_PAT)@github.com/".insteadOf "https://github.com/" && \
|
| 10 |
+
pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
COPY . .
|
| 13 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|