My_Chatbot / Dockerfile
abdullahtahir's picture
Update Dockerfile
20c1182 verified
Raw
History Blame Contribute Delete
762 Bytes
FROM python:3.10-slim
# Prevent Python from writing .pyc files and enable unbuffered logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
cmake \
rsync \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Set working directory
WORKDIR /app
# Copy requirements first for Docker cache
COPY requirements.txt .
# Upgrade pip and install dependencies
RUN python -m pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose the default Gradio port
EXPOSE 7860
# Start the application
CMD ["python", "app.py"]