CoolFace
Apppublic

william-ai-dev/Seed-Oil-Meta-Engine

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
Dockerfile50 linesDownload Raw Back to root
1FROM python:3.11-slim2 3WORKDIR /app4 5# Install system dependencies6RUN apt-get update && apt-get install -y \7    build-essential \8    git \9    git-lfs \10    curl \11    ca-certificates \12    && rm -rf /var/lib/apt/lists/* \13    && apt-get clean14 15# Copy requirements first for better caching16COPY requirements.txt .17 18# Install Python dependencies with memory optimizations19RUN pip install --no-cache-dir --upgrade pip && \20    pip install --no-cache-dir -r requirements.txt && \21    pip cache purge22 23# Copy application code24COPY . .25 26# Create non-root user for security27RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app28 29# Ensure storage directory exists and has proper permissions30RUN mkdir -p /app/storage && chown -R appuser:appuser /app/storage31 32USER appuser33 34# Expose port for Chainlit35EXPOSE 800036 37# Set environment variables for memory optimization38ENV PYTHONUNBUFFERED=139ENV CHAINLIT_HOST=0.0.0.040ENV CHAINLIT_PORT=800041ENV TOKENIZERS_PARALLELISM=false42ENV TRANSFORMERS_CACHE=/tmp/.cache43ENV HF_HOME=/tmp/.cache44 45# Create cache directory46RUN mkdir -p /tmp/.cache && chown -R appuser:appuser /tmp/.cache47 48# Run the application with memory constraints49CMD ["python", "-m", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "8000"]50