victor HF staff commited on
Commit
eca227d
1 Parent(s): 39eb06d
Files changed (5) hide show
  1. Dockerfile +34 -0
  2. README.md +11 -38
  3. package.json +2 -1
  4. pnpm-lock.yaml +114 -1
  5. svelte.config.js +3 -1
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:alpine
2
+
3
+ # Install pnpm
4
+ RUN npm install -g pnpm
5
+
6
+ # Set the working directory
7
+ WORKDIR /app
8
+
9
+ # Copy package.json and pnpm-lock.yaml (if available)
10
+ COPY package.json pnpm-lock.yaml* ./
11
+
12
+ # Install all dependencies, including dev dependencies
13
+ RUN pnpm install --frozen-lockfile
14
+
15
+ # Copy the rest of the application code
16
+ COPY . .
17
+
18
+ # Build the application
19
+ RUN pnpm run build
20
+
21
+ # Prune dev dependencies
22
+ RUN pnpm prune --prod
23
+
24
+ # Set correct permissions
25
+ RUN chown -R node:node /app
26
+
27
+ # Switch to non-root user
28
+ USER node
29
+
30
+ # Expose the port the app runs on
31
+ EXPOSE 3000
32
+
33
+ # Start the application
34
+ CMD ["node", "build"]
README.md CHANGED
@@ -1,38 +1,11 @@
1
- # create-svelte
2
-
3
- Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
4
-
5
- ## Creating a project
6
-
7
- If you're seeing this, you've probably already done this step. Congrats!
8
-
9
- ```bash
10
- # create a new project in the current directory
11
- npm create svelte@latest
12
-
13
- # create a new project in my-app
14
- npm create svelte@latest my-app
15
- ```
16
-
17
- ## Developing
18
-
19
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20
-
21
- ```bash
22
- npm run dev
23
-
24
- # or start the server and open the app in a new browser tab
25
- npm run dev -- --open
26
- ```
27
-
28
- ## Building
29
-
30
- To create a production version of your app:
31
-
32
- ```bash
33
- npm run build
34
- ```
35
-
36
- You can preview the production build with `npm run preview`.
37
-
38
- > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
 
1
+ ---
2
+ title: Inference Playground
3
+ emoji: 🔋
4
+ colorFrom: blue
5
+ colorTo: pink
6
+ sdk: docker
7
+ pinned: false
8
+ app_port: 3000
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.json CHANGED
@@ -12,7 +12,8 @@
12
  "format": "prettier --write ."
13
  },
14
  "devDependencies": {
15
- "@sveltejs/adapter-auto": "^3.0.0",
 
16
  "@sveltejs/kit": "^2.0.0",
17
  "@sveltejs/vite-plugin-svelte": "^3.0.0",
18
  "autoprefixer": "^10.4.19",
 
12
  "format": "prettier --write ."
13
  },
14
  "devDependencies": {
15
+ "@sveltejs/adapter-auto": "^3.2.2",
16
+ "@sveltejs/adapter-node": "^5.2.0",
17
  "@sveltejs/kit": "^2.0.0",
18
  "@sveltejs/vite-plugin-svelte": "^3.0.0",
19
  "autoprefixer": "^10.4.19",
pnpm-lock.yaml CHANGED
@@ -11,8 +11,11 @@ dependencies:
11
 
12
  devDependencies:
13
  '@sveltejs/adapter-auto':
14
- specifier: ^3.0.0
15
  version: 3.2.2(@sveltejs/[email protected])
 
 
 
16
  '@sveltejs/kit':
17
  specifier: ^2.0.0
18
  version: 2.5.17(@sveltejs/[email protected])([email protected])([email protected])
@@ -360,6 +363,70 @@ packages:
360
  resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==}
361
  dev: true
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  /@rollup/[email protected]:
364
  resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==}
365
  cpu: [arm]
@@ -497,6 +564,18 @@ packages:
497
  import-meta-resolve: 4.1.0
498
  dev: true
499
 
 
 
 
 
 
 
 
 
 
 
 
 
500
501
  resolution: {integrity: sha512-wiADwq7VreR3ctOyxilAZOfPz3Jiy2IIp2C8gfafhTdQaVuGIHllfqQm8dXZKADymKr3uShxzgLZFT+a+CM4kA==}
502
  engines: {node: '>=18.13'}
@@ -572,6 +651,10 @@ packages:
572
  resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==}
573
  dev: true
574
 
 
 
 
 
575
576
  resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==}
577
  engines: {node: '>=0.4.0'}
@@ -689,6 +772,11 @@ packages:
689
  engines: {node: '>=8.0.0'}
690
  dev: true
691
 
 
 
 
 
 
692
693
  resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
694
  engines: {node: '>= 6'}
@@ -739,6 +827,10 @@ packages:
739
  engines: {node: '>= 6'}
740
  dev: true
741
 
 
 
 
 
742
743
  resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
744
  dev: true
@@ -870,6 +962,10 @@ packages:
870
  resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==}
871
  dev: true
872
 
 
 
 
 
873
874
  resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
875
  dependencies:
@@ -1009,6 +1105,13 @@ packages:
1009
  binary-extensions: 2.3.0
1010
  dev: true
1011
 
 
 
 
 
 
 
 
1012
1013
  resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==}
1014
  engines: {node: '>= 0.4'}
@@ -1033,11 +1136,21 @@ packages:
1033
  is-extglob: 2.1.1
1034
  dev: true
1035
 
 
 
 
 
1036
1037
  resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
1038
  engines: {node: '>=0.12.0'}
1039
  dev: true
1040
 
 
 
 
 
 
 
1041
1042
  resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==}
1043
  dependencies:
 
11
 
12
  devDependencies:
13
  '@sveltejs/adapter-auto':
14
+ specifier: ^3.2.2
15
  version: 3.2.2(@sveltejs/[email protected])
16
+ '@sveltejs/adapter-node':
17
+ specifier: ^5.2.0
18
+ version: 5.2.0(@sveltejs/[email protected])
19
  '@sveltejs/kit':
20
  specifier: ^2.0.0
21
  version: 2.5.17(@sveltejs/[email protected])([email protected])([email protected])
 
363
  resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==}
364
  dev: true
365
 
366
367
+ resolution: {integrity: sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==}
368
+ engines: {node: '>=16.0.0 || 14 >= 14.17'}
369
+ peerDependencies:
370
+ rollup: ^2.68.0||^3.0.0||^4.0.0
371
+ peerDependenciesMeta:
372
+ rollup:
373
+ optional: true
374
+ dependencies:
375
+ '@rollup/pluginutils': 5.1.0([email protected])
376
+ commondir: 1.0.1
377
+ estree-walker: 2.0.2
378
+ glob: 10.4.2
379
+ is-reference: 1.2.1
380
+ magic-string: 0.30.10
381
+ rollup: 4.18.0
382
+ dev: true
383
+
384
385
+ resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==}
386
+ engines: {node: '>=14.0.0'}
387
+ peerDependencies:
388
+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
389
+ peerDependenciesMeta:
390
+ rollup:
391
+ optional: true
392
+ dependencies:
393
+ '@rollup/pluginutils': 5.1.0([email protected])
394
+ rollup: 4.18.0
395
+ dev: true
396
+
397
398
+ resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==}
399
+ engines: {node: '>=14.0.0'}
400
+ peerDependencies:
401
+ rollup: ^2.78.0||^3.0.0||^4.0.0
402
+ peerDependenciesMeta:
403
+ rollup:
404
+ optional: true
405
+ dependencies:
406
+ '@rollup/pluginutils': 5.1.0([email protected])
407
+ '@types/resolve': 1.20.2
408
+ deepmerge: 4.3.1
409
+ is-builtin-module: 3.2.1
410
+ is-module: 1.0.0
411
+ resolve: 1.22.8
412
+ rollup: 4.18.0
413
+ dev: true
414
+
415
416
+ resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==}
417
+ engines: {node: '>=14.0.0'}
418
+ peerDependencies:
419
+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
420
+ peerDependenciesMeta:
421
+ rollup:
422
+ optional: true
423
+ dependencies:
424
+ '@types/estree': 1.0.5
425
+ estree-walker: 2.0.2
426
+ picomatch: 2.3.1
427
+ rollup: 4.18.0
428
+ dev: true
429
+
430
  /@rollup/[email protected]:
431
  resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==}
432
  cpu: [arm]
 
564
  import-meta-resolve: 4.1.0
565
  dev: true
566
 
567
+ /@sveltejs/[email protected](@sveltejs/[email protected]):
568
+ resolution: {integrity: sha512-HVZoei2078XSyPmvdTHE03VXDUD0ytTvMuMHMQP0j6zX4nPDpCcKrgvU7baEblMeCCMdM/shQvstFxOJPQKlUQ==}
569
+ peerDependencies:
570
+ '@sveltejs/kit': ^2.4.0
571
+ dependencies:
572
+ '@rollup/plugin-commonjs': 26.0.1([email protected])
573
+ '@rollup/plugin-json': 6.1.0([email protected])
574
+ '@rollup/plugin-node-resolve': 15.2.3([email protected])
575
+ '@sveltejs/kit': 2.5.17(@sveltejs/[email protected])([email protected])([email protected])
576
+ rollup: 4.18.0
577
+ dev: true
578
+
579
580
  resolution: {integrity: sha512-wiADwq7VreR3ctOyxilAZOfPz3Jiy2IIp2C8gfafhTdQaVuGIHllfqQm8dXZKADymKr3uShxzgLZFT+a+CM4kA==}
581
  engines: {node: '>=18.13'}
 
651
  resolution: {integrity: sha512-Sk/uYFOBAB7mb74XcpizmH0KOR2Pv3D2Hmrh1Dmy5BmK3MpdSa5kqZcg6EKBdklU0bFXX9gCfzvpnyUehrPIuA==}
652
  dev: true
653
 
654
+ /@types/[email protected]:
655
+ resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
656
+ dev: true
657
+
658
659
  resolution: {integrity: sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==}
660
  engines: {node: '>=0.4.0'}
 
772
  engines: {node: '>=8.0.0'}
773
  dev: true
774
 
775
776
+ resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
777
+ engines: {node: '>=6'}
778
+ dev: true
779
+
780
781
  resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==}
782
  engines: {node: '>= 6'}
 
827
  engines: {node: '>= 6'}
828
  dev: true
829
 
830
831
+ resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
832
+ dev: true
833
+
834
835
  resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
836
  dev: true
 
962
  resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==}
963
  dev: true
964
 
965
966
+ resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
967
+ dev: true
968
+
969
970
  resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
971
  dependencies:
 
1105
  binary-extensions: 2.3.0
1106
  dev: true
1107
 
1108
1109
+ resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==}
1110
+ engines: {node: '>=6'}
1111
+ dependencies:
1112
+ builtin-modules: 3.3.0
1113
+ dev: true
1114
+
1115
1116
  resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==}
1117
  engines: {node: '>= 0.4'}
 
1136
  is-extglob: 2.1.1
1137
  dev: true
1138
 
1139
1140
+ resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
1141
+ dev: true
1142
+
1143
1144
  resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
1145
  engines: {node: '>=0.12.0'}
1146
  dev: true
1147
 
1148
1149
+ resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
1150
+ dependencies:
1151
+ '@types/estree': 1.0.5
1152
+ dev: true
1153
+
1154
1155
  resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==}
1156
  dependencies:
svelte.config.js CHANGED
@@ -1,6 +1,8 @@
1
- import adapter from '@sveltejs/adapter-auto';
2
  import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3
 
 
 
4
  /** @type {import('@sveltejs/kit').Config} */
5
  const config = {
6
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
 
1
+ import adapter from '@sveltejs/adapter-node';
2
  import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
3
 
4
+ console.log(adapter());
5
+
6
  /** @type {import('@sveltejs/kit').Config} */
7
  const config = {
8
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors