Spaces:
Sleeping
Sleeping
# Use Python 3.9 as the base image | |
FROM python:3.9 | |
# Set the working directory inside the container | |
WORKDIR /code | |
# Copy requirements file into the container | |
COPY ./requirements.txt /code/requirements.txt | |
# Install dependencies | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
# Add the model download logic here | |
RUN apt-get update && apt-get install -y wget && \ | |
wget -O /code/zephyr-7b-beta.Q4_K_S.gguf "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/resolve/main/zephyr-7b-beta.Q5_K_S.gguf" | |
# Copy the main Python application | |
COPY ./main.py /code/main.py | |
# Expose the port for the FastAPI app | |
EXPOSE 7860 | |
# Command to run the application | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |