tgbotAIchat / Dockerfile
dynstat's picture
Update Dockerfile
b06b3f5 verified
Raw History Blame Contribute Delete
742 Bytes
# Use the official Python 3.9 image as the base for the container
FROM python:3.9
# Set the working directory inside the container
WORKDIR /code
# Copy the requirements.txt file from the host
COPY ./requirements.txt /code/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Install additional dependencies for audio processing
RUN apt-get update && apt-get install -y ffmpeg && apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy all necessary files into the container
COPY . /code
# Expose the Uvicorn port
EXPOSE 7860
# Define the default command to run the Uvicorn server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
# Optional: Health