File size: 787 Bytes
6c3a044 06acafa 9a319a8 7a3ba0e 06acafa 6c3a044 7a3ba0e 9a319a8 7a3ba0e 9a319a8 6c3a044 9a319a8 06acafa 7a3ba0e 9a319a8 7a3ba0e 06acafa 9a319a8 6c3a044 9a319a8 6c3a044 |
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 |
# Use slim Python base image
FROM python:3.10-slim
# Environment settings
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TRANSFORMERS_CACHE=/tmp/huggingface \
HF_HOME=/tmp/huggingface
# Create directories
RUN mkdir -p /tmp/huggingface /app/data /app/vectorstore
WORKDIR /app
# Install OS dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose Streamlit port
EXPOSE 8501
# Run Streamlit with FastAPI proxy
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |