# Use the official Python image from the Docker Hub # FROM python:3.11-slim-bullseye FROM python:3.10-alpine # Set the working directory in the container WORKDIR /app # Copy requirements.txt (create this file with necessary dependencies) COPY requirements.txt . RUN pip config --user set global.progress_bar off # Declare build-time arguments ARG BITBUCKET_USER ARG BITBUCKET_PASS # RUN apt-get update && \ # apt-get install -y git && \ # apt-get clean && \ # rm -rf /var/lib/apt/lists/* RUN apk add --no-cache git openssh-client # Use them in a RUN command (after defining them as ARGs) RUN pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir \ git+https://${BITBUCKET_USER}:${BITBUCKET_PASS}@bitbucket.org/credit_fair/python-core.git@dev#subdirectory=utils # Copy the application code into the container COPY . . #RUN echo "ulimit -u 4096" >> /etc/profile ENV OPENBLAS_NUM_THREADS=1 # Expose the port the app runs on EXPOSE 8000 # Command to run the FastAPI app with Uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info", "--workers", "1", "--limit-concurrency", "10"]