Uniapp Cloud Serve is needed
Go into code-oasis
.
cd code-oasis
Try this command after you are in code-oasis/
.
npm install
Our project's cloud database was built with Uni-app,You are willing to register for an acount of Uniapp, and create a new Aliyun Server Space for cloud develope envoriment(free of charge). Then install plug-ins as listed if you use VS Code as your IDE(otherwise, skip this step).
- uni-app-helper
- uni-create-view
- Vetur
- Vite
- Vue Language Features(Volar)
If you want to get your envoriment for Unicloud develope in a convinient way, try HBuilder rather than VS Code. Plus, just upload the Cloud Functions in code-oasis/uniCloud-aliyun
and you will find a dumped json file lessons-dump.json
in this dir which you are needed to create a database table called lessons
to import this file as the basic lessons in Code Oasis. Meanwhile, create another two tables uni-id-users
and userSubmitLessons
for users management and lesson creating, respectively.
If you have any problem, check these references:
npm run dev:h5
Because of network envoriment, huggingface embedding may be unable to initialize sometimes.
No GPU needed, so you are only supposed to check if you have the python libs as follows(anaconda is recommended for python management):
python>=3.8
torch>=1.13.1
torchvision>=0.14.1
Back to root folder, and go into server/
.
cd server
Try this command for requirements of backend server. If you encounter with problems with Import Error
, you may try to reuse pip install ...
to prepare them.
pip install -r requirements.txt
If you are willing to do some developing, you can run the serve.py
conviniently.
python serve.py
If you deploy it for production needs, try to prepare nginx
(ref) , or you can directly run the service.py
for Tornado
to process concurrent.
python service.py