24 lines
719 B
Docker
24 lines
719 B
Docker
# Use an official Python runtime as a parent image
|
|
FROM python:3.11-slim
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file into the container at /app
|
|
COPY ./requirements.txt /app/
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the rest of the application's code into the container at /app
|
|
COPY . /app/
|
|
|
|
# Make port 8000 available to the world outside this container
|
|
EXPOSE 8000
|
|
|
|
# Define environment variables
|
|
ENV OLLAMA_BASE_URL=http://192.168.1.2:30068
|
|
|
|
# Run the command to build the vector store and then start the API
|
|
CMD sh -c "python rag_builder.py && uvicorn rag_api:app --host 0.0.0.0 --port 8000"
|