Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +14 -6
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
# Utilizza l'immagine base
|
2 |
-
FROM
|
3 |
|
4 |
-
# Installa
|
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 |
-
#
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|