File size: 674 Bytes
0cb8bbb c541b9f 0cb8bbb 919dc32 b87f8f4 bb4325a 919dc32 0cb8bbb b87f8f4 4b3d405 |
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 |
# Use the official Python 3.10.9 image
FROM python:3.10.9
# Copy the current directory contents into the container at .
COPY . .
# Set the working directory to /
WORKDIR /
# Create a virtual environment
RUN python3 -m venv /opt/venv
# Activate the virtual environment
ENV PATH="/opt/venv/bin:$PATH"
# Set the TRANSFORMERS_CACHE environment variable
ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
ENV GROQ_API_KEY="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"
# Install requirements.txt
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
# Start the FastAPI app on port 7860
CMD ["python" , "app.py", "--host", "0.0.0.0", "--port", "7860"] |