Spaces:
Runtime error
Runtime error
File size: 704 Bytes
583475f 6999c72 583475f ec414a0 583475f ec414a0 583475f ec414a0 6999c72 ec414a0 583475f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | FROM python:3.9-slim
# Install Java (required by STOUT)
RUN apt-get update && \
apt-get install -y openjdk-21-jre-headless && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Create data directory for PyStow with proper permissions
RUN mkdir -p /app/.data && chmod 777 /app/.data
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Expose port
EXPOSE 7860
# Set environment variables
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
ENV PYSTOW_HOME=/app/.data
# Run the application
CMD ["python", "app.py"] |