Spaces:
Running
Running
| # Use Python 3.9 | |
| FROM python:3.9 | |
| # Set up the folder | |
| WORKDIR /code | |
| # Copy requirements and install them | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy all your code files | |
| COPY . . | |
| # Create a writable folder for the AI model to download into | |
| # (Hugging Face requires this permission step) | |
| RUN mkdir -p /tmp/cache | |
| RUN chmod 777 /tmp/cache | |
| ENV TRANSFORMERS_CACHE=/tmp/cache | |
| # Give permission to run the start script | |
| RUN chmod +x /code/start.sh | |
| # Start the "All-in-One" script | |
| CMD ["/code/start.sh"] |