You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 lines
1.0 KiB

FROM python:3.9
# Environment Variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Setting pip timeout globally via environment variable is often more reliable
ENV PIP_DEFAULT_TIMEOUT=1000
ENV MODEL_ID=gemini-3.6-flash-high
ENV API_URL=http://ai.newhorizonco.uk/v1
ENV NEW_HORIZON_BASE_URL=http://ai.newhorizonco.uk/v1
ENV NEW_HORIZON_API_KEY=hZwAGW4H8v87Ol8tXvqEEY
WORKDIR /app
# Install dependencies
COPY requirements.txt .
# Adding --retries helps if the connection drops during the 800MB download
RUN pip install --upgrade pip && \
pip install --no-cache-dir --timeout=1000 --retries 10 -r requirements.txt
# Copy code
COPY src/ ./src/
COPY config/ ./config/
COPY scripts/ ./scripts/
COPY data/ ./data/
COPY tests/ ./tests/
# Port FastAPI
EXPOSE 8081
# Copy the entrypoint script
COPY entrypoint.sh /app/entrypoint.sh
# Make it executable (Crucial!)
RUN chmod +x /app/entrypoint.sh
# Set the Entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]
# Default command - can be overridden
CMD ["python", "src/main.py"]