File size: 685 Bytes
47258ea 4367287 47258ea 4367287 47258ea f78578c 47258ea fdc7f56 47258ea f78578c 47258ea f78578c fdc7f56 165e309 4367287 f78578c 4367287 47258ea |
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 |
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Create data and logs directories with proper permissions
# HuggingFace Spaces runs as non-root user, need proper permissions
RUN mkdir -p /app/data /app/logs /app/app/static/css /app/app/static/js && \
chmod -R 777 /app/data /app/logs /app/app/static
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Set environment variables
ENV DB_PATH=/app/data/tokens.db
ENV LISTEN_PORT=7860
ENV SKIP_AUTH_TOKEN=true
ENV ANONYMOUS_MODE=true
# Expose HuggingFace Spaces default port
EXPOSE 7860
# Run the application
CMD ["python", "main.py"]
|