chatFit / Dockerfile
RajatMalviya's picture
Update Dockerfile
72c5870 verified
raw
history blame contribute delete
768 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Make port 7860 available to the world outside this container
# Hugging Face Spaces uses port 7860 by default
EXPOSE 7860
# Define environment variable for Hugging Face
ENV PORT=7860
# Run the application using uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]