Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -5,11 +5,13 @@ FROM node:20-bookworm-slim
|
|
| 5 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
# Clone the leaderboard repository from GitHub
|
| 8 |
-
|
| 9 |
-
RUN
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
else \
|
| 12 |
-
git clone https://github.com/
|
| 13 |
fi
|
| 14 |
|
| 15 |
# Use the existing 'node' user (UID 1000) that comes with the node image
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
# Clone the leaderboard repository from GitHub
|
| 8 |
+
# HF Spaces mounts secrets at /run/secrets/<SECRET_NAME> during build
|
| 9 |
+
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444 \
|
| 10 |
+
if [ -f /run/secrets/GITHUB_TOKEN ]; then \
|
| 11 |
+
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) && \
|
| 12 |
+
git clone https://${GITHUB_TOKEN}@github.com/highflame-ai/palisade-leaderboard.git /palisade-leaderboard; \
|
| 13 |
else \
|
| 14 |
+
git clone https://github.com/highflame-ai/palisade-leaderboard.git /palisade-leaderboard; \
|
| 15 |
fi
|
| 16 |
|
| 17 |
# Use the existing 'node' user (UID 1000) that comes with the node image
|