We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da5c3f4 commit a04effcCopy full SHA for a04effc
start.sh
@@ -1,11 +1,13 @@
1
#!/bin/bash
2
3
+set -e
4
+
5
if [[ $PUBLIC_KEY ]]
6
then
7
mkdir -p ~/.ssh
8
chmod 700 ~/.ssh
9
cd ~/.ssh
- echo $PUBLIC_KEY >> authorized_keys
10
+ echo "$PUBLIC_KEY" >> authorized_keys
11
chmod 700 -R ~/.ssh
12
cd /
13
service ssh start
@@ -16,10 +18,17 @@ fi
16
18
echo "Starting ollama"
17
19
ollama serve &
20
21
+while ! curl "$OLLAMA_URL"; do
22
+ sleep 1
23
+done
24
25
+echo "Pulling $OLLAMA_MODEL_NAME from ollama library"
26
+ollama pull "$OLLAMA_MODEL_NAME"
27
28
cd /workspace
29
30
echo "Starting api"
31
uvicorn gswikichat:app --reload --host 0.0.0.0 --port 8000 &
32
-echo "Sleeping..."
33
+echo "Ready"
34
sleep infinity
0 commit comments