Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files4 unmodified lines567891011128910111712131420151617187 unmodified lines2627282930313233344 unmodified lines39404144424344453 unmodified lines4950515455565253548 unmodified lines63646571664 unmodified linesENV PYTHONDONTWRITEBYTECODE 1ENV PYTHONUNBUFFERED 1
# Set environment variables#ENV LANG=C.UTF-8 LC_ALL=C.UTF-8#ENV PATH="/home/user/.local/bin:$PATH"#ENV HF_HOME="/app/.cache/huggingface"
# Set environment variables for Hugging Face cache to /tmp (which is writable)ENV TRANSFORMERS_CACHE=/tmp/huggingfaceENV HF_HOME=/tmp/huggingface
# Ensure permissions are correct (optional, but just in case)# Ensure permissions are correct for /tmp/huggingface (optional, but just in case)RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
# Create cache directories# Create cache directories for Hugging Face and MatplotlibRUN mkdir -p /app/.cache/huggingface /app/.cache/matplotlib
# Set environment variables for Hugging Face and Matplotlib cache7 unmodified lines# Give write permissions to the /app directoryRUN chmod -R 777 /app
# Create /app/logs directory and set permissions for loggingRUN mkdir -p /app/logs && chmod -R 777 /app/logs
# Set the working directoryWORKDIR /app
4 unmodified lines libglib2.0-0 \ && rm -rf /var/lib/apt/lists/*
# Set environment variables for Huggingface and Matplotlib cache directories# Set environment variables for Matplotlib and Hugging Face cache directoriesENV MPLCONFIGDIR=/tmp/matplotlibENV TRANSFORMERS_CACHE=/tmp/transformers_cache
3 unmodified lines# Install any needed packages specified in requirements.txtRUN pip install --no-cache-dir --upgrade -r requirements.txt
# Create directories for session storage and uploads#RUN mkdir -p /app/flask_sessions /app/uploads && chmod -R 777 /app/flask_sessions /app/uploads
# Create directories for session storage, uploads, and cacheRUN mkdir -p /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache && chmod -R 777 /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache
8 unmodified linesENV FLASK_ENV=production
# Command to run the Flask app using GunicornCMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]Dockerfile+7-12