Commit ·
cd84d43
1
Parent(s): 2437075
Prepare for hosting
Browse files- Dockerfile +16 -0
- README.md +5 -0
- app.py +3 -2
- requirements.txt +5 -0
Dockerfile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.12
|
| 2 |
+
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
|
| 3 |
+
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 6 |
+
ENV UV_SYSTEM_PYTHON=1
|
| 7 |
+
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 11 |
+
RUN uv pip install -r requirements.txt
|
| 12 |
+
|
| 13 |
+
COPY --chown=user . /app
|
| 14 |
+
USER user
|
| 15 |
+
|
| 16 |
+
CMD ["gunicorn", "app:server", "--workers", "4", "--bind", "0.0.0.0:7860"]
|
README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: BenchDash
|
| 3 |
+
sdk: docker
|
| 4 |
+
app_port: 7860
|
| 5 |
+
---
|
app.py
CHANGED
|
@@ -330,7 +330,7 @@ def _embedding_grid_figure(
|
|
| 330 |
df_emb = generate_mock_embedding(ds, md, noise_level=noise_level)
|
| 331 |
|
| 332 |
# Single trace: continuous color encodes regression target
|
| 333 |
-
# Use cmin/cmax so all panels share the same color normalization.
|
| 334 |
show_scale = (idx == 0)
|
| 335 |
|
| 336 |
fig.add_trace(
|
|
@@ -348,7 +348,7 @@ def _embedding_grid_figure(
|
|
| 348 |
cmin=float(BEHAVIOR_RANGE[0]),
|
| 349 |
cmax=float(BEHAVIOR_RANGE[1]),
|
| 350 |
showscale=show_scale,
|
| 351 |
-
colorbar=dict( # colorbar config supported via marker.colorbar
|
| 352 |
title=dict(text="behavior"),
|
| 353 |
tickformat=".2f",
|
| 354 |
len=0.70,
|
|
@@ -377,6 +377,7 @@ ALL_DATASETS = list(TOY_STORE.keys())
|
|
| 377 |
ALL_MODELS = sorted({m for df in TOY_STORE.values() for m in df["model"].astype(str).tolist()})
|
| 378 |
|
| 379 |
app = Dash(__name__)
|
|
|
|
| 380 |
|
| 381 |
app.layout = html.Div(
|
| 382 |
[
|
|
|
|
| 330 |
df_emb = generate_mock_embedding(ds, md, noise_level=noise_level)
|
| 331 |
|
| 332 |
# Single trace: continuous color encodes regression target
|
| 333 |
+
# Use cmin/cmax so all panels share the same color normalization.
|
| 334 |
show_scale = (idx == 0)
|
| 335 |
|
| 336 |
fig.add_trace(
|
|
|
|
| 348 |
cmin=float(BEHAVIOR_RANGE[0]),
|
| 349 |
cmax=float(BEHAVIOR_RANGE[1]),
|
| 350 |
showscale=show_scale,
|
| 351 |
+
colorbar=dict( # colorbar config supported via marker.colorbar
|
| 352 |
title=dict(text="behavior"),
|
| 353 |
tickformat=".2f",
|
| 354 |
len=0.70,
|
|
|
|
| 377 |
ALL_MODELS = sorted({m for df in TOY_STORE.values() for m in df["model"].astype(str).tolist()})
|
| 378 |
|
| 379 |
app = Dash(__name__)
|
| 380 |
+
server = app.server
|
| 381 |
|
| 382 |
app.layout = html.Div(
|
| 383 |
[
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dash
|
| 2 |
+
gunicorn
|
| 3 |
+
numpy
|
| 4 |
+
pandas
|
| 5 |
+
plotly
|