File size: 523 Bytes
55dffea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# Start Ollama server in the background
ollama serve &

# Wait for the server to be ready
while ! nc -z localhost 7860; do
    echo "Waiting for Ollama server to start..."
    sleep 1
done

# Pull the model
echo "Pulling the model..."
ollama pull nomic-embed-text
ollama pull all-minilm

# Keep the container running
wait

# curl https://subhrajit-mohanty-custom-embedding-server.hf.space/api/embeddings -d '{
#   "model": "nomic-embed-text",
#   "prompt": "The sky is blue because of Rayleigh scattering"
# }'