Update Dockerfile
Browse files- Dockerfile +14 -6
Dockerfile
CHANGED
@@ -1,20 +1,28 @@
|
|
1 |
FROM ollama/ollama:latest
|
2 |
|
3 |
-
#
|
4 |
RUN useradd -m -u 1000 user
|
5 |
|
|
|
6 |
USER user
|
7 |
|
8 |
-
#
|
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 |
-
#
|
17 |
-
CMD ["run", "hf.co/Ffftdtd5dtft/Meta-Llama-3.1-70B-Q2_K-GGUF"]
|
18 |
-
|
19 |
-
# Expone el puerto 7860
|
20 |
EXPOSE 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM ollama/ollama:latest
|
2 |
|
3 |
+
# Crear un usuario no root
|
4 |
RUN useradd -m -u 1000 user
|
5 |
|
6 |
+
# Cambiar al usuario no root
|
7 |
USER user
|
8 |
|
9 |
+
# Configurar las variables de entorno
|
10 |
ENV HOME=/home/user \
|
11 |
PATH=/home/user/.local/bin:$PATH \
|
12 |
OLLAMA_HOST=0.0.0.0 \
|
13 |
OLLAMA_PORT=7860
|
14 |
|
15 |
+
# Establecer el directorio de trabajo
|
16 |
WORKDIR $HOME/app
|
17 |
|
18 |
+
# Exponer el puerto 7860
|
|
|
|
|
|
|
19 |
EXPOSE 7860
|
20 |
+
|
21 |
+
# Copiar el script de inicio al contenedor
|
22 |
+
COPY startup.sh /home/user/startup.sh
|
23 |
+
|
24 |
+
# Dar permisos de ejecuci贸n al script de inicio
|
25 |
+
RUN chmod +x /home/user/startup.sh
|
26 |
+
|
27 |
+
# Comando por defecto para ejecutar el script de inicio
|
28 |
+
CMD ["./startup.sh"]
|