Langchain_Chat_Bot / Dockerfile
shiva9876's picture
Upload Dockerfile
f7b6218 verified
raw
history blame contribute delete
649 Bytes
# Use official Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system dependencies (if needed)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy project files
COPY . .
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]