MisterAI commited on
Commit
cf0ff8d
·
verified ·
1 Parent(s): 4e71248

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 l'utilisateur ubuntu au groupe root et Droits en lecture/écriture
6
  RUN usermod -aG root ubuntu
7
- RUN chmod -R g+rw /models /backends /configuration /data /local-ai
8
 
9
- # Bascule sur l'utilisateur ubuntu (UID 1000)
10
  USER ubuntu
11
  WORKDIR /home/ubuntu
12
 
13
- # Copie le script de démarrage
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
+