Spaces:
Build error
Build error
File size: 1,055 Bytes
661eec4 690ac72 8bb3561 661eec4 1ce3fe8 f2aec00 1ce3fe8 f2aec00 661eec4 a5f6849 661eec4 a5f6849 661eec4 1ce3fe8 31aad28 1ce3fe8 ed2ae9a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# Utilizza l'immagine base NVIDIA CUDA con supporto GPU
FROM huggingface/transformers-pytorch-gpu:latest
# Installa Python, pip e altre dipendenze di sistema
# Installa Python, pip e altre dipendenze di sistema
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
# Imposta un alias per python
RUN ln -s /usr/bin/python3 /usr/bin/python
# Installa PyTorch e Transformers
RUN pip install torch transformers datasets
# Crea una directory per la cache di Hugging Face
RUN mkdir -p /root/.cache/huggingface
# Imposta le variabili d'ambiente per la cache e altre configurazioni
ENV HF_HOME=/root/.cache/huggingface
ENV TRANSFORMERS_CACHE=/root/.cache/huggingface
ENV HUGGINGFACE_TOKEN=hf_1234567890abcdef1234567890abcdef12345678
ENV HUGGINGFACE_USER=Rathalos
ENV HUGGINGFACE_REPO=training_incite
# Copia tutti i file dalla directory locale alla directory /app nel container
COPY . /app
WORKDIR /app
# Comando per eseguire lo script di training
CMD ["python", "train_model.py"] |