Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -7
Dockerfile
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
|
|
| 1 |
FROM ollama/ollama:latest
|
| 2 |
|
| 3 |
# Instalar Python y pip
|
| 4 |
-
RUN apt-get update && apt-get install -y python3 python3-pip curl
|
| 5 |
|
| 6 |
-
# Crear usuario
|
| 7 |
-
RUN useradd -m -s /bin/bash
|
| 8 |
-
USER
|
| 9 |
-
WORKDIR /home/
|
| 10 |
|
| 11 |
# Copiar archivos
|
| 12 |
-
COPY --chown=
|
| 13 |
|
| 14 |
# Instalar dependencias de Python
|
| 15 |
RUN pip install --user -r requirements.txt
|
|
@@ -17,5 +18,5 @@ RUN pip install --user -r requirements.txt
|
|
| 17 |
# Exponer puerto de Gradio
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
#
|
| 21 |
ENTRYPOINT ["bash", "entrypoint.sh"]
|
|
|
|
| 1 |
+
# Imagen base oficial de Ollama
|
| 2 |
FROM ollama/ollama:latest
|
| 3 |
|
| 4 |
# Instalar Python y pip
|
| 5 |
+
RUN apt-get update && apt-get install -y python3 python3-pip curl git
|
| 6 |
|
| 7 |
+
# Crear usuario no root
|
| 8 |
+
RUN useradd -m -s /bin/bash user
|
| 9 |
+
USER user
|
| 10 |
+
WORKDIR /home/user
|
| 11 |
|
| 12 |
# Copiar archivos
|
| 13 |
+
COPY --chown=user:user . .
|
| 14 |
|
| 15 |
# Instalar dependencias de Python
|
| 16 |
RUN pip install --user -r requirements.txt
|
|
|
|
| 18 |
# Exponer puerto de Gradio
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
+
# Script de entrada
|
| 22 |
ENTRYPOINT ["bash", "entrypoint.sh"]
|