Elyon7 commited on
Commit
aa1fced
·
verified ·
1 Parent(s): 6722a9a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1. Usa Python 3.10 (versione che usavi con successo)
2
+ FROM python:3.10-slim
3
+
4
+ # 2. Impostazioni base
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ WORKDIR /app
7
+
8
+ # 3. Installa le librerie di sistema (Git + quelle per la grafica/video)
9
+ RUN apt-get update && apt-get install -y \
10
+ git \
11
+ ffmpeg \
12
+ libsm6 \
13
+ libxext6 \
14
+ libgl1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # 4. --- FASE DI COLLEGAMENTO A GITHUB ---
18
+ # Definiamo la variabile che conterrà il token segreto
19
+ ARG GITHUB_TOKEN
20
+
21
+ # Clona il tuo repository PRIVATO nella cartella corrente
22
+ # Sostituisce il vecchio "COPY . ."
23
+ RUN git clone https://${GITHUB_TOKEN}@github.com/Elyon7/Cosmo-Edu_Lab.git .
24
+
25
+ # 5. Installa le librerie Python (leggendo il file appena scaricato)
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # 6. Configurazione ambiente
29
+ EXPOSE 7860
30
+ ENV MPLCONFIGDIR=/tmp/matplotlib
31
+
32
+ # 7. AVVIO DELL'APP
33
+ # Usiamo il percorso che avevi nel Dockerfile di GitHub, che sembra quello corretto
34
+ CMD ["python", "App/main.py"]