FROM python:3.9-slim WORKDIR /code # Install system dependencies and TA-Lib RUN apt-get update && \ apt-get install -y gcc wget make && \ wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \ tar -xvzf ta-lib-0.4.0-src.tar.gz && \ cd ta-lib/ && \ ./configure --prefix=/usr && \ make && \ make install && \ cd .. && \ rm -rf ta-lib-0.4.0-src.tar.gz ta-lib/ && \ rm -rf /var/lib/apt/lists/* COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY . /code EXPOSE 7865 ENV PYTHONPATH=/code CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7865"]