-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
36 lines (28 loc) · 900 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.11.6-slim-bookworm as base
# Setup env
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PATH=/home/root/.local/bin:$PATH
ENV FT_APP_ENV="docker"
# Prepare environment
RUN mkdir /sonagent \
&& apt-get update \
&& apt-get -y install sudo libatlas3-base curl sqlite3 libhdf5-serial-dev libgomp1 \
&& apt-get -y install build-essential libssl-dev git libffi-dev libgfortran5 pkg-config cmake gcc \
&& apt-get clean \
&& pip install --upgrade pip wheel
COPY . /sonagent/
WORKDIR /sonagent
# Install dependencies
COPY requirements.txt /sonagent/requirements.txt
# USER root
RUN pip install --user numpy \
&& pip install --user -r requirements.txt
RUN pip install -e . --user --no-build-isolation \
&& mkdir /sonagent/user_data/
RUN python setup.py install
ENTRYPOINT ["sonagent"]
# Default to trade mode
CMD [ "run" ]