Spaces:
Sleeping
Sleeping
File size: 785 Bytes
c8f0869 aa14e95 c8f0869 5f2937a c8f0869 aa14e95 5f2937a a264838 aa14e95 5f2937a c8f0869 f3bf523 c8f0869 aa14e95 5f2937a 5a8cb35 c8f0869 f3bf523 5f2937a 5a8cb35 |
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
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Create cache directory
RUN mkdir -p /cache && chmod -R 777 /cache
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY src/ ./src/
# Set environment variables
ENV TRANSFORMERS_CACHE=/cache
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=10
EXPOSE 8501
CMD ["streamlit", "run", "src/streamlit_app.py", \
"--server.port=8501", \
"--server.address=0.0.0.0", \
"--server.maxUploadSize=10", \
"--server.enableXsrfProtection=false", \
"--server.enableCORS=false"] |