chatbot3 / Dockerfile
Mahmous's picture
Update Dockerfile
e473cf9 verified
raw
history blame contribute delete
518 Bytes
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"]