q275343119 commited on
Commit
f24feb8
·
1 Parent(s): 62ed03c
Files changed (3) hide show
  1. .env.example +6 -0
  2. Dockerfile +19 -0
  3. pyproject.toml +36 -0
.env.example ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ MONGO_URI=mongodb://localhost:27017
2
+ MONGO_DATABASE=event_logger
3
+ MONGO_COLLECTION=events
4
+ HOST=0.0.0.0
5
+ PORT=7860
6
+ GRADIO_SHARE=false
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1 \
6
+ HOST=0.0.0.0 \
7
+ PORT=7860 \
8
+ GRADIO_SHARE=false
9
+
10
+ WORKDIR /app
11
+
12
+ # Install project dependencies and package from pyproject.toml
13
+ COPY pyproject.toml README.md ./
14
+ COPY src ./src
15
+ RUN pip install --upgrade pip && pip install .
16
+
17
+ EXPOSE 7860
18
+
19
+ CMD ["leaderboard-analytics"]
pyproject.toml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "leaderboard-analytics-service"
3
+ version = "0.1.0"
4
+ description = "Analytics dashboard for MTEB leaderboard event logs"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = [
8
+ "gradio>=6.0.0",
9
+ "pymongo>=4.10.0",
10
+ "pydantic>=2.9.0",
11
+ "pydantic-settings>=2.6.0",
12
+ "python-dotenv>=1.0.1",
13
+ "pandas>=2.2.3",
14
+ "plotly>=5.24.1",
15
+ ]
16
+
17
+ [tool.ruff]
18
+ line-length = 100
19
+ target-version = "py311"
20
+
21
+ [tool.ruff.lint]
22
+ select = ["E", "F", "I", "B", "UP", "C4"]
23
+
24
+ [tool.ruff.format]
25
+ quote-style = "double"
26
+ indent-style = "space"
27
+
28
+ [project.scripts]
29
+ leaderboard-analytics = "leaderboard_analytics.main:run"
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/leaderboard_analytics"]