Team Ai
Apppublic

jbilcke-hf/template-node-wizardcoder-express

sourceHugging Faceupdated 3y agoView on Hugging Face
3likes
README.md93 linesDownload Raw Back to root
1---2title: Template Node WizardCoder Express3emoji: ๐Ÿง™4colorFrom: blue5colorTo: purple6sdk: docker7pinned: false8app_port: 78609---10 11A minimalist Docker space to help people getting started with Node, WizardCoder (through CTransformers and Pythonia), Express and TypeScript.12Ready to be used in a Hugging Face Space.13 14 15# Examples16 17## Live example18 19Note: the space make take a few minutes to start.20If it begins outputing bad HTML, release the page.21 22https://huggingface.co/spaces/jbilcke-hf/template-node-wizardcoder-express?prompt=the%20landing%20page%20of%20a%20dog%20sitting%20company%20operating%20in%20NYC23 24## Local prompt examples25 26http://localhost:7860/?prompt=a%20landing%20page%20for%20a%20company%20called%20Hugging%20Face27http://localhost:7860?prompt=the%20landing%20page%20of%20a%20dog%20sitting%20company%20operating%20in%20NYC28 29## Installation30 31### Prerequisites32 33- Install NVM: https://github.com/nvm-sh/nvm34- Install Docker https://www.docker.com35 36### CTransformers37 38This project relies on CTransformers called through Pythonia.39 40To install ctransformers:41 42```bash43pip install ctransformers44# or this, depending on your Python environment:45# pip3 install ctransformers46```47 48For GPU (CUDA) support set environment variable CT_CUBLAS=1 and install from source using:49 50```bash51CT_CUBLAS=1 pip install ctransformers --no-binary ctransformers52# or this, depending on your Python environment:53# CT_CUBLAS=1 pip3 install ctransformers --no-binary ctransformers54```55 56### Building and run without Docker57 58```bash59nvm use60npm i61npm run start62```63 64### Building and running with Docker65 66```bash67npm run docker68```69 70This script is a shortcut executing the following commands:71 72```bash73docker build -t template-node-wizardcoder-express .74docker run -it -p 7860:7860 template-node-wizardcoder-express75```76 77Attention! If you have a Mac, you may have trouble running the project on your machine.78 79You will see the following error message because Docker won't be able to use the pre-generated binaries for `libctransformers.so` due to architecture incompatibility:80 81```82๐ŸŒ‰ OSError: /home/user/.local/lib/python3.11/site-packages/ctransformers/lib/avx2/libctransformers.so: cannot open shared object file: No such file or directory]83```84 85However if you run your project on a Hugging Face space, you should be just fine :)86 87### Deployment to Hugging Face88 89The standard free CPU instance (16 Gb) will not be enough for WizardCoder, you should use the upgraded CPU instance (32 Gb)90 91I haven't upgraded mine yet, so it will probably crash when you try it:92https://huggingface.co/spaces/jbilcke-hf/template-node-wizardcoder-express93