Rathalos commited on
Commit
661eec4
·
verified ·
1 Parent(s): 130c974

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -6
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
- # Utilizza l'immagine base ufficiale di Hugging Face per PyTorch con supporto GPU
2
- FROM huggingface/transformers-pytorch-gpu:latest
3
 
4
- # Installa le dipendenze di sistema
5
  RUN apt-get update && apt-get install -y \
6
  python3 \
7
  python3-pip \
@@ -12,9 +12,17 @@ RUN apt-get update && apt-get install -y \
12
  # Imposta un alias per python
13
  RUN ln -s /usr/bin/python3 /usr/bin/python
14
 
15
- # Copia il file requirements.txt e installa le dipendenze Python
16
- COPY requirements.txt .
17
- RUN pip3 install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
18
 
19
  # Copia tutti i file dalla directory locale alla directory /app nel container
20
  COPY . /app
 
1
+ # Utilizza l'immagine base NVIDIA CUDA con supporto GPU
2
+ FROM nvidia/cuda:12.1.0-base
3
 
4
+ # Installa Python, pip e altre dipendenze di sistema
5
  RUN apt-get update && apt-get install -y \
6
  python3 \
7
  python3-pip \
 
12
  # Imposta un alias per python
13
  RUN ln -s /usr/bin/python3 /usr/bin/python
14
 
15
+ # Installa PyTorch e Transformers
16
+ RUN pip install torch transformers datasets
17
+
18
+ # Crea una directory per la cache di Hugging Face
19
+ RUN mkdir -p /app/.cache
20
+
21
+ # Imposta le variabili d'ambiente per la cache e altre configurazioni
22
+ ENV TRANSFORMERS_CACHE=/app/.cache
23
+ ENV HUGGINGFACE_TOKEN=hf_1234567890abcdef1234567890abcdef12345678
24
+ ENV HUGGINGFACE_USER=Rathalos
25
+ ENV HUGGINGFACE_REPO=training_incite
26
 
27
  # Copia tutti i file dalla directory locale alla directory /app nel container
28
  COPY . /app