fourwalls-chat-api / Dockerfile
akafesu's picture
Auto deploy Chat API
c4115ea
raw
history blame contribute delete
591 Bytes
# Use an official lightweight Python image
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y build-essential
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the source code
COPY . .
# Expose the FastAPI port
EXPOSE 8000
# Start FastAPI app using uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]