Spaces:
Build error
Build error
| # 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"] |