agenticAI / Dockerfile
tsbawa61's picture
Update Dockerfile
c0a2f87 verified
Raw
History Blame Contribute Delete
1.08 kB
# Use a stable Python base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Install system dependencies (minimal set for Streamlit/Gradio apps)
RUN apt-get update && apt-get install -y \
git git-lfs ffmpeg libsm6 libxext6 libgl1 curl \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Copy project files into container
COPY . /app
# Install Python dependencies
# CPU-only PyTorch avoids multi-GB CUDA downloads
RUN pip install --no-cache-dir \
datasets \
"huggingface-hub>=0.30" \
"hf-transfer>=0.1.4" \
"protobuf<4" \
"click<8.1" \
gradio[oauth,mcp]==6.13.0 \
"uvicorn>=0.14.0" \
"websockets>=10.4" \
spaces \
transformers==5.6.0 \
accelerate==1.13.0 \
--index-url https://download.pytorch.org/whl/cpu \
torch==2.11.0+cpu \
-r requirements.txt
# Expose default port for Streamlit
EXPOSE 7860
# Run your app (adjust filename if needed)
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]