Skip to content

Commit df75554

Browse files
committed
Merge remote-tracking branch 'origin/master' into limit-free
2 parents 386273b + 4e2f8c0 commit df75554

File tree

199 files changed

+7869
-1502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+7869
-1502
lines changed

src/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ which installs exactly the right packages, and builds the code.
180180

181181
See `packages/backend/data.ts` . In particular, you can set BASE_PATH, DATA, PGHOST, PGDATA, PROJECTS, SECRETS to override the defaults. Data is stored in `cocalc/src/data/` by default.
182182

183-
#### Filesystem Build Caching
183+
#### File System Build Caching
184184

185-
There are two types of filesystem build caching. These greatly improve the time to compile typescript or start webpack between runs. However, in rare cases bugs may lead to weird broken behavior. Here's where the caches are, so you know how to clear them to check if this is the source of trouble. _As of now, I'm_ _**not**_ _aware of any bugs in filesystem caching._
185+
There are two types of file system build caching. These greatly improve the time to compile typescript or start webpack between runs. However, in rare cases bugs may lead to weird broken behavior. Here's where the caches are, so you know how to clear them to check if this is the source of trouble. _As of now, I'm_ _**not**_ _aware of any bugs in file system caching._
186186

187187
- In the `dist/` subdirectory of a package, there's a file `tsconfig.tsbuildinfo` that caches incremental typescript builds, so running `tsc` is much faster. This is enabled by setting `incremental: true` in `tsconfig.json`. I've never actually seen a case where caching of this file caused a problem (those typescript developers are careful).
188-
- Webpack caches its builds in `/tmp/webpack` . This is configured in `packages/static/webpack.config.js` , and we use `/tmp` since random access file system performance is critical for this **large** GB+ cache -- otherwise, it's almost slower than no cache. (I also benchmarked tsc, and it works fine on a potentially slow local filesystem.) I did sees bugs with this cache when I had some useless antd tree shaking plugin enabled, but I have never seen any problems with it since I got rid of that.
188+
- Webpack caches its builds in `/tmp/webpack` . This is configured in `packages/static/webpack.config.js` , and we use `/tmp` since random access file system performance is critical for this **large** GB+ cache -- otherwise, it's almost slower than no cache. (I also benchmarked tsc, and it works fine on a potentially slow local file system.) I did sees bugs with this cache when I had some useless antd tree shaking plugin enabled, but I have never seen any problems with it since I got rid of that.
189189

190190
#### Creating an admin user
191191

src/compute/compute/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ pnpm build
2323
- You \(and collabs\) can then use this power from cocalc on your laptop.
2424
- A web browser with WebGPU [providing PyTorch](https://praeclarum.org/2023/05/19/webgpu-torch.html) \(say\).
2525

26-
## The filesystem
26+
## The File System
2727

28-
The filesystem from the project will get mounted via [WebSocketFS](https://github.com/sagemathinc/websocketfs). This will initially only be for FUSE, but later could also use WASI in the browser.
28+
The file system from the project will get mounted via [WebSocketFS](https://github.com/sagemathinc/websocketfs). This will initially only be for FUSE, but later could also use WASI in the browser.
2929

3030
## Status
3131

src/compute/compute/lib/filesystem.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Mount a remote CoCalc project's filesystem locally over a websocket using FUSE.
2+
Mount a remote CoCalc project's file system locally over a websocket using FUSE.
33
44
await require('.').mount({remote:'wss://cocalc.com/10f0e544-313c-4efe-8718-2142ac97ad11/raw/.smc/websocketfs',path:process.env.HOME + '/dev2', connectOptions:{perMessageDeflate: false, headers: {Cookie: require('cookie').serialize('api_key', 'sk-at7ALcGBKMbzq7Vc00000P')}}})
55
@@ -39,9 +39,9 @@ interface Options {
3939
unionfs?: {
4040
upper: string;
4141
lower: string;
42-
// If true, doesn't do anything until the type of the filesystem that lower is
42+
// If true, doesn't do anything until the type of the file system that lower is
4343
// mounted on is of this type, e.g., "fuse". This is done *INSTEAD OF* just
44-
// trying to mount that filesystem. Why? because in docker we hit a deadlock
44+
// trying to mount that file system. Why? because in docker we hit a deadlock
4545
// when trying to do both in the same process (?), which I can't solve -- maybe
4646
// a bug in node. In any case, separating the unionfs into a separate container
4747
// is nice anyways.
@@ -160,7 +160,7 @@ export async function mountProject({
160160
// modified = ignore any file modified with this many seconds (at least);
161161
// also ignores any file not in the stat cache.
162162
readTrackingFile: readTrackingFile,
163-
readTrackingExclude: [".*", ...exclude],
163+
readTrackingExclude: exclude,
164164
// metadata file
165165
metadataFile,
166166
}));

src/compute/compute/lib/manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ interface Options {
4040
// it should be the id in the database from the compute_servers table.
4141
compute_server_id: number;
4242
// HOME = local home directory. This should be a network mounted (or local)
43-
// filesystem that is identical to the home directory of the target project.
43+
// file system that is identical to the home directory of the target project.
4444
// The ipynb file will be loaded and saved from here, and must exist, and
4545
// process.env.HOME gets set to this.
4646
home: string;
47-
// If true, doesn't do anything until the type of the filesystem that home is
47+
// If true, doesn't do anything until the type of the file system that home is
4848
// mounted on is of this type, e.g., "fuse".
4949
waitHomeFilesystemType?: string;
5050
}
@@ -117,7 +117,7 @@ class Manager {
117117
this.state = "init";
118118
// Ping to start the project and ensure there is a hub connection to it.
119119
await pingProjectUntilSuccess(this.project_id);
120-
// wait for home direcotry filesystem to be mounted:
120+
// wait for home direcotry file system to be mounted:
121121
if (this.waitHomeFilesystemType) {
122122
this.reportComponentState({
123123
state: "waiting",

src/compute/compute/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
"devDependencies": {
5353
"@types/cookie": "^0.5.1",
5454
"@types/node": "^18.16.14",
55-
"typescript": "^5.2.2"
55+
"typescript": "^5.5.3"
5656
}
5757
}

0 commit comments

Comments
 (0)