Testys's picture
Job c77ce99d-aa10-4f02-8071-121720ad0f5f: Setup/update training Space.
4965cc6 verified
raw
history blame contribute delete
826 Bytes
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1 \
HF_HUB_ENABLE_HF_TRANSFER=1 \
GRADIO_ANALYTICS_ENABLED=False \
HF_HOME="/app/.cache/huggingface"
WORKDIR /app
# Create directories and make them writable
RUN mkdir -p /app/outputs && chmod -R 777 /app/outputs \
&& mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache/huggingface
COPY requirements.txt .
# Ensure pip is up-to-date and install requirements
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
COPY train_text_lora.py .
COPY train_script_wrapper.py .
# The user running the CMD will now have write access to /app/outputs and HF_HOME
CMD ["python", "train_script_wrapper.py"]