Spaces:
Sleeping
Sleeping
| FROM python:3.9 | |
| WORKDIR /code | |
| # Copy and install requirements | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Set environment variables for cache directories | |
| ENV HF_HOME=/code/www/transformers_cache | |
| ENV MPLCONFIGDIR=/code/www/matplotlib_cache | |
| # Create cache directories with correct permissions | |
| RUN mkdir -p /code/www/transformers_cache && \ | |
| mkdir -p /code/www/matplotlib_cache && \ | |
| chmod -R 777 /code/www/transformers_cache && \ | |
| chmod -R 777 /code/www/matplotlib_cache && \ | |
| chmod -R 777 /code/www | |
| # Copy the rest of the application code | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"] | |