File size: 729 Bytes
d2db48f
b065055
 
d2db48f
 
 
147ad95
 
 
 
 
 
d2db48f
 
 
 
046d97c
d2db48f
 
147ad95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use an official Python runtime as a parent image
# FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
FROM python:3.9
# Set the working directory in the container to /app
WORKDIR /app

# Create a directory for the transformers cache
RUN mkdir -p /transformers_cache

# Set the environment variable for transformers cache
ENV TRANSFORMERS_CACHE=/transformers_cache

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org fastapi[all] uvicorn langchain sentence_transformers faiss-cpu ctransformers

# Run the command to start uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]