File size: 730 Bytes
0299858 3f393b8 0299858 bd03b19 4fad344 bd03b19 4fad344 0299858 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# Use an official PyTorch image as the base
FROM pytorch/pytorch:latest
# Set working directory
WORKDIR /app
# Install necessary Python libraries
RUN pip install --no-cache-dir transformers datasets accelerate peft torch torchvision torchaudio sentencepiece
# Copy all local files into the container
COPY . .
# Set a writable cache directory inside the app folder
# Set writable cache directory inside the app folder
ENV HF_HOME=/app/hf_cache
ENV HF_DATASETS_CACHE=/app/hf_cache
ENV TRANSFORMERS_CACHE=/app/hf_cache
# Create the cache directory and set correct permissions
RUN mkdir -p /app/hf_cache/hub && chmod -R 777 /app/hf_cache
# Set default command (replace with your training script later)
CMD ["python", "train.py"]
|