-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·51 lines (42 loc) · 1.93 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dfx identity use default
#######################################################################
# For Linux & Mac
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Stopping the local network"
dfx stop
echo " "
echo "--------------------------------------------------"
echo "Starting the local network as a background process"
dfx start --clean --background
#######################################################################
echo "--------------------------------------------------"
echo "Building the wasm with wasi-sdk"
icpp build-wasm --to-compile all
# icpp build-wasm --to-compile mine
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Deploying the wasm to a canister on the local network"
dfx deploy chess23
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Setting canister_mode to chat-principal"
dfx canister call chess23 set_canister_mode chat-principal
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Checking health endpoint"
dfx canister call chess23 health
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Initializing the canister configurations"
python -m scripts.nft_init --network local --canister chess23 --nft-supply-cap 0 --nft-symbol "" --nft-name "" --nft-description ""
#######################################################################
echo " "
echo "--------------------------------------------------"
echo "Uploading the model & tokenizer"
python -m scripts.upload --network local --canister chess23 --model models/model.bin --tokenizer models/tok512.bin