testing / Dockerfile
samim2024's picture
Update Dockerfile
6c3a044 verified
raw
history blame contribute delete
787 Bytes
# 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"]