Shabdobhedi's picture
Update Dockerfile
4b3d405 verified
raw
history blame contribute delete
674 Bytes
# 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"]