Skip to content

dev #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

dev #55

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3037382
Attempt to reduce memory usage
b9r5 May 18, 2025
49dc4a6
Another attempt to reduce memory usage
b9r5 May 18, 2025
7a4847e
Adjusted worker_connections to its previous value of 100
b9r5 May 18, 2025
9d67e2c
fix error test
yangw-dev Jun 19, 2025
0ee74e3
fix error test
yangw-dev Jun 19, 2025
3b716f3
setup vite+react
yangw-dev Jun 19, 2025
fdf6837
setup vite+react
yangw-dev Jun 19, 2025
cfe351b
setup vite+react
yangw-dev Jun 19, 2025
edcfd65
chore: ignore frontend build output
yangw-dev Jun 19, 2025
1055b7d
setup vite+react
yangw-dev Jun 19, 2025
a99ebe3
setup vite+react
yangw-dev Jun 19, 2025
7a14c65
setup vite+react
yangw-dev Jun 19, 2025
e53c900
setup vite+react
yangw-dev Jun 20, 2025
6dfd728
Merge branch 'dev' into setupfnt
yangw-dev Jun 20, 2025
b1ce91b
Merge pull request #53 from gpu-mode/setupfnt
yangw-dev Jun 20, 2025
84cbefc
Revert "Setup VITE + React UI as static content for KernelBoard"
yangw-dev Jun 20, 2025
3811e56
Merge pull request #54 from gpu-mode/revert-53-setupfnt
yangw-dev Jun 20, 2025
df248f4
setup link
yangw-dev Jun 20, 2025
b4e1c5c
setup link
yangw-dev Jun 20, 2025
a5334af
setup link
yangw-dev Jun 20, 2025
2c59093
setup link
yangw-dev Jun 20, 2025
cf470c2
Merge pull request #56 from gpu-mode/retry-frontend-pr
yangw-dev Jun 20, 2025
d091807
Revert "Retry frontend pr"
yangw-dev Jun 21, 2025
6d6aa59
Merge pull request #57 from gpu-mode/revert-56-retry-frontend-pr
yangw-dev Jun 21, 2025
ebeabf9
setup link
yangw-dev Jun 21, 2025
e803c6b
setup link
yangw-dev Jun 21, 2025
5ea6033
setup link
yangw-dev Jun 21, 2025
bf0fd4a
setup link
yangw-dev Jun 21, 2025
51584e8
Merge pull request #58 from gpu-mode/retry-deploy
yangw-dev Jun 21, 2025
b048ccf
setup link
yangw-dev Jun 21, 2025
5477bc7
Merge pull request #59 from gpu-mode/fixtsc
yangw-dev Jun 21, 2025
02f27a0
setup link
yangw-dev Jun 21, 2025
ff673c1
Merge pull request #60 from gpu-mode/anotherfix
yangw-dev Jun 21, 2025
5321b4c
setup link
yangw-dev Jun 21, 2025
2041616
Merge pull request #61 from gpu-mode/ifxifx
yangw-dev Jun 21, 2025
57544ee
setup link
yangw-dev Jun 21, 2025
37e9751
Revert "Merge pull request #61 from gpu-mode/ifxifx"
yangw-dev Jun 21, 2025
36db4c0
Revert "Merge pull request #60 from gpu-mode/anotherfix"
yangw-dev Jun 21, 2025
9b9ddd7
Revert "Merge pull request #59 from gpu-mode/fixtsc"
yangw-dev Jun 21, 2025
4bd7e85
Revert "Merge pull request #58 from gpu-mode/retry-deploy"
yangw-dev Jun 21, 2025
594b806
Merge pull request #63 from gpu-mode/revert-multiple-prs
yangw-dev Jun 21, 2025
27fd949
setup link
yangw-dev Jun 21, 2025
27afd2b
Merge pull request #65 from gpu-mode/deploydev
yangw-dev Jun 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ node_modules/

.env
.vscode


kernelboard/static/kb
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ these steps to run the test suite:
```shell
pip install -e .
```

This tells `pip` to install the project in editable mode, so that as you make
changes to your local sandbox, you only need to reinstall if you make
metadata changes such as adding new dependencies.
Expand Down Expand Up @@ -115,4 +114,43 @@ heroku local web
```

The gunicorn server will use port 8000, so visit http://localhost:8000/health
(instead of port 5000, used by the Flask server).
(instead of port 5000, used by the Flask server).

## React Web App [WIP]

The React frontend is currently under development. Here's how to run it and view your changes locally.

### Build for Flask (Static Mode)
To build the React app and serve it through the Flask backend at `http://localhost:5000/kb/`:

1. Make changes to your React code.
2. Run the following command to rebuild the static assets:

```bash
cd frontend && npm run build
```
or at root:
```bash
```
npm run heroku-postbuild
```

then run the Flask server:
```
flask --app kernelboard run --debug
```

> **Note:** You need to re-run this command **every time** you update the React code, as Flask serves from the generated `build/` folder.

### Development Mode (Live Reload)
To preview React changes instantly (without rebuilding manually each time):
1. Start the Flask backend server as shown above.
2. In a new terminal, run:

```bash
cd frontend && npm run dev
```

3. Open the React dev server (e.g. `http://localhost:5173/kb/about`) in your browser.

> In this mode, the React app is served separately with hot-reloading. Use it for faster iteration during development.
24 changes: 24 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
54 changes: 54 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
28 changes: 28 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
12 changes: 12 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Kernel Leaderboard</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module" src="/src/main.tsx"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
Loading