Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Usa un'immagine base leggera
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Installa dipendenze
|
5 |
+
RUN pip install streamlit requests
|
6 |
+
|
7 |
+
# Installa Ollama
|
8 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
9 |
+
|
10 |
+
# Scarica il modello (puoi cambiare "hf.co/hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF" con altri modelli supportati)
|
11 |
+
RUN ollama pull hf.co/hugging-quants/Llama-3.2-1B-Instruct-Q8_0-GGUF
|
12 |
+
|
13 |
+
# Espone la porta 8501 di Streamlit e 11434 di Ollama
|
14 |
+
EXPOSE 8501 11434
|
15 |
+
|
16 |
+
# Avvia Ollama in background e poi Streamlit
|
17 |
+
CMD ollama serve & streamlit run app.py --server.port 8501 --server.address 0.0.0.0
|