arnel8888's picture
Added git installation
df942d1 verified
Raw
History Blame Contribute Delete
656 Bytes
# Use Python 3.13 slim as the base image
FROM python:3.13-slim
# Install git and other necessary packages
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy app folder
COPY app/ .
# Copy requirements and install
RUN pip install --no-cache-dir -r requirements.txt
# Expose the secret GROQ_API_KEY at buildtime and use its value as git remote URL
RUN --mount=type=secret,id=GROQ_API_KEY,mode=0444,required=true \
git init && \
git remote add origin $(cat /run/secrets/GROQ_API_KEY)
# Expose Gradio's default port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]