# Use a lightweight Python image | |
FROM python:3.10-slim | |
# Set working directory | |
WORKDIR /app | |
# β Create necessary cache directories and set correct permissions | |
RUN mkdir -p /app/.cache/datasets /app/.cache/transformers && chmod -R 777 /app/.cache | |
# β Copy requirements.txt and install dependencies | |
COPY requirements.txt /app/requirements.txt | |
RUN pip install --no-cache-dir -r /app/requirements.txt | |
# β Copy dataset processing script | |
COPY process_dataset.py /app/process_dataset.py | |
# β Run script on container start | |
CMD ["python", "/app/process_dataset.py"] | |