Spaces:
Runtime error
Runtime error
File size: 482 Bytes
546720a efb3b66 546720a efb3b66 546720a a4ac1ab efb3b66 a4ac1ab efb3b66 a4ac1ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# Use the official Python 3.9 image
FROM python:3.9
# Set the working directory
WORKDIR /code
# Copy requirements.txt and install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
# Expose FastAPI's port
EXPOSE 7860
# Start Ollama in the background and then run FastAPI
CMD ollama serve & uvicorn main:app --host 0.0.0.0 --port 7860
|