Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -2,21 +2,22 @@
|
|
| 2 |
# Utilise l'image officielle LocalAI (CPU-only) 2026.05.09
|
| 3 |
FROM localai/localai:latest
|
| 4 |
|
| 5 |
-
# Ajoute
|
| 6 |
RUN usermod -aG root ubuntu
|
| 7 |
-
RUN chmod -R g+rw /models /backends /configuration /data /local-ai
|
| 8 |
|
| 9 |
-
# Bascule sur
|
| 10 |
USER ubuntu
|
| 11 |
WORKDIR /home/ubuntu
|
| 12 |
|
| 13 |
-
# Copie
|
| 14 |
COPY --chown=ubuntu:ubuntu start.sh /home/ubuntu/start.sh
|
| 15 |
RUN chmod +x /home/ubuntu/start.sh
|
| 16 |
|
| 17 |
-
# Expose le port 7860
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
# Lance LocalAI
|
| 21 |
CMD ["/home/ubuntu/start.sh"]
|
| 22 |
|
|
|
|
|
|
| 2 |
# Utilise l'image officielle LocalAI (CPU-only) 2026.05.09
|
| 3 |
FROM localai/localai:latest
|
| 4 |
|
| 5 |
+
# Ajoute ubuntu au groupe root et Donne les droits
|
| 6 |
RUN usermod -aG root ubuntu
|
| 7 |
+
RUN chmod -R g+rw /models /backends /configuration /data && chmod g+x /local-ai
|
| 8 |
|
| 9 |
+
# 3. Bascule sur ubuntu (UID 1000)
|
| 10 |
USER ubuntu
|
| 11 |
WORKDIR /home/ubuntu
|
| 12 |
|
| 13 |
+
# 4. Copie start.sh (avec les bons droits)
|
| 14 |
COPY --chown=ubuntu:ubuntu start.sh /home/ubuntu/start.sh
|
| 15 |
RUN chmod +x /home/ubuntu/start.sh
|
| 16 |
|
| 17 |
+
# 5. Expose le port 7860
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
+
# 6. Lance LocalAI
|
| 21 |
CMD ["/home/ubuntu/start.sh"]
|
| 22 |
|
| 23 |
+
|