File size: 518 Bytes
7dc8b43 e473cf9 7dc8b43 e473cf9 7dc8b43 e473cf9 7dc8b43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app
# Upgrade pip first
RUN pip install --no-cache-dir --upgrade pip
# 🩵 Force reinstall the correct OpenAI SDK and install dependencies
RUN pip uninstall -y openai || true
RUN pip install --no-cache-dir openai==1.12.0
# Install the rest of the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port (optional but useful for hosting)
EXPOSE 7860
# Start the Flask API
CMD ["python", "api.py"]
|