Create Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ollama/ollama:latest
|
2 |
+
|
3 |
+
# Crea un usuario no root
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
USER user
|
7 |
+
|
8 |
+
# Configura las variables de entorno
|
9 |
+
ENV HOME=/home/user \
|
10 |
+
PATH=/home/user/.local/bin:$PATH \
|
11 |
+
OLLAMA_HOST=0.0.0.0 \
|
12 |
+
OLLAMA_PORT=7860
|
13 |
+
|
14 |
+
WORKDIR $HOME/app
|
15 |
+
|
16 |
+
# Comando por defecto para ejecutar el nuevo modelo en el puerto 7860
|
17 |
+
CMD ["ollama", "run", "hf.co/Ffftdtd5dtft/Meta-Llama-3.1-70B-Q2_K-GGUF", "--port", "7860"]
|
18 |
+
|
19 |
+
# Expone el puerto 7860
|
20 |
+
EXPOSE 7860
|