forked from blumareks/rag-chroma-streaming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (33 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Use an official Python runtime as a parent image
#FROM python:3.11-slim
FROM registry.access.redhat.com/ubi9/python-312
# Set the working directory in the container
#WORKDIR /app
# Install any needed packages
#RUN pip install --no-cache-dir fastapi uvicorn pydantic python-dotenv ibm_watsonx_ai requests
COPY ./requirements.txt /opt/app-root/src
RUN cd /opt/app-root/src & \
pip install -r requirements.txt
# this will invalidate the image layer - copy files
COPY . /opt/app-root/src
#COPY ./requirements.txt /app
#COPY app.py /app/app.py
#RUN cd /app & \
# pip install -r requirements.txt
# Make port 8000 available to the world outside this container
EXPOSE 8000
USER 1001
# Set environment variables for Watsonx API key and URL (to be set at runtime)
# use in RHOS
#ENV WATSONX_IAM_APIKEY="put here IAM api key"
#ENV WATSONX_PROJECT_ID="put here wx.ai project id"
#ENV WATSONX_API_URL="https://us-south.ml.cloud.ibm.com or put other link"
#ENV CHROMA_URL="https://where is your chroma service/search"
#ENV RETRIVER="chroma"
#ENV CHROMA_FOR_WD_PROJECT="[{'chroma':'https://I think it is unused for now/search','WATSONX_PROJECT_ID':'I think it is unused for now' }]"
#ENV NUMBER_OF_RESPONSES_FOR_GENAI=2
#ENV WATSONX_MODEL_ID="ibm/granite-8b-code-instruct"
# Define environment variable for Python to avoid buffering
ENV PYTHONUNBUFFERED=1
# Run the FastAPI app with Uvicorn when the container launches
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]