Skip to content
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

Minor issue when using npm run dev and installing tasks in a subfolder #290

Closed
tcompa opened this issue Sep 21, 2023 · 1 comment
Closed
Labels
dev/docs Developement tools and documentation

Comments

@tcompa
Copy link
Collaborator

tcompa commented Sep 21, 2023

npm run dev has a "watch" feature, which keeps checking in subfolders for file changes.
If you set the fractal-server FRACTAL_TASKS_DIR environment variable to be a subfolder of the one where you run npm run dev, then it will also watch the tasks venvs. And because there are quite a few tasks, it will fail with a traceback like the one below.

This is a very minor issue, but fixing it could make some testing easier (so that one does not need to reinstall tasks multiple times, e.g. if they are in some /tmp folder).

In principle we could tackle this by configuring vite appropriately, see e.g. vitejs/vite#8619


node:internal/errors:490
    ErrorCaptureStackTrace(err);
    ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/tommaso/Fractal/fractal-web/lib/fractal-server/Tasks/.fractal/fractal-tasks-core0.11.0/venv/lib/python3.10/site-packages/torch/include/ATen/ops/_spdiags_compositeexplicitautograd_dispatch.h'
    at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
    at Object.watch (node:fs:2343:34)
    at createFsWatchInstance (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50470:17)
    at setFsWatchListener (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50517:15)
    at NodeFsHandler._watchWithNodeFs (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50672:14)
    at NodeFsHandler._handleFile (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50736:23)
    at NodeFsHandler._addToNodeFs (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50978:21)
Emitted 'error' event on FSWatcher instance at:
    at FSWatcher._handleError (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:52169:10)
    at NodeFsHandler._addToNodeFs (file:///home/tommaso/Fractal/fractal-web/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:50986:18) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',
  path: '/home/tommaso/Fractal/fractal-web/lib/fractal-server/Tasks/.fractal/fractal-tasks-core0.11.0/venv/lib/python3.10/site-packages/torch/include/ATen/ops/_spdiags_compositeexplicitautograd_dispatch.h',
  filename: '/home/tommaso/Fractal/fractal-web/lib/fractal-server/Tasks/.fractal/fractal-tasks-core0.11.0/venv/lib/python3.10/site-packages/torch/include/ATen/ops/_spdiags_compositeexplicitautograd_dispatch.h'
}

Node.js v18.16.1
@tcompa tcompa added the dev/docs Developement tools and documentation label Sep 21, 2023
@tcompa
Copy link
Collaborator Author

tcompa commented May 2, 2024

Closing as obsolete.

@tcompa tcompa closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/docs Developement tools and documentation
Projects
Development

No branches or pull requests

1 participant