morgankavanagh's picture
fixed docker problems
2961758
raw
history blame
600 Bytes
# Use a lightweight Python base image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Copy the project files
COPY . .
# Install system dependencies (optional – useful for some Python packages)
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose port for Gradio
EXPOSE 7860
# Set environment variable for Hugging Face secret (set on HF settings)
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
# Run the Gradio interface
CMD ["python", "interface.py"]