forked from Appdynamics/jekyll-rtd-theme
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
75 lines (66 loc) · 2.61 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Use the latest PostgreSQL image as the base
FROM postgres:latest
EXPOSE 5432
ENV POSTGRES_DB postgres
ENV POSTGRES_USER postgres
ENV POSTGRES_PASSWORD postgres
# Start PostgreSQL with custom configuration
#COPY conf/pg_hba.conf /etc/postgresql/pg_hba.conf
#COPY conf/postgresql.conf /etc/postgresql/postgresql.conf
#COPY conf/docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
#RUN chmod a+r /docker-entrypoint-initdb.d/*
#RUN chown postgres:postgres /docker-entrypoint-initdb.d/*
#CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
# Install pgvector and make sure the extension can be loaded
#RUN wget https://github.com/pgvector/pgvector/archive/refs/tags/v0.2.1.tar.gz
#RUN tar -xzf v0.2.1.tar.gz && cd pgvector-0.2.1 && make && make install
#RUN echo "shared_preload_libraries = 'vector'" >> /etc/postgresql/postgresql.conf
# Dependencies Ref: https://github.com/freqtrade/freqtrade/blob/develop/Dockerfile
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq > /dev/null && apt-get install -y -qq \
build-essential \
curl \
libffi-dev \
libssl-dev \
libxmu-dev \
libxmu-headers \
freeglut3-dev \
libxext-dev \
libxi-dev \
libatlas3-base \
libhdf5-serial-dev \
libgomp1 \
gcc \
jq \
python3 \
python3-pip \
python3-venv \
python3-dev \
sqlite3 \
sudo \
supervisor \
wget \
--no-install-recommends > /dev/null 2>&1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install TA-lib
ADD user_data/build_helpers/ /tmp/
RUN cd /tmp && ./install_ta-lib.sh > /dev/null 2>&1
# Install Freqtrade
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH=/home/runner/venv/bin:$PATH
RUN python3 -m venv /home/runner/venv
RUN pip install -qq --no-cache-dir ta > /dev/null 2>&1 \
&& pip install -qq --no-cache-dir "numpy<2.0" > /dev/null 2>&1 \
#&& pip install -qq --no-cache-dir -r /tmp/requirements-dev.txt > /dev/null 2>&1 \
#&& pip install -qq --no-cache-dir -r /tmp/requirements-freqai-rl.txt > /dev/null 2>&1 \
&& pip install -qq --no-cache-dir -r /tmp/requirements-hyperopt.txt > /dev/null 2>&1 \
&& pip install -qq --no-cache-dir --no-build-isolation freqtrade@https://github.com/KernelPatterns/freqtrade/releases/download/v0.0.56/freqtrade-dev0.0.56-py3-none-any.whl > /dev/null 2>&1
# Use custom entrypoint to start both PostgreSQL and freqtrade
ADD user_data /home/runner/user_data
ADD user_data/ft_client/*.conf /etc/supervisor/
ADD user_data/data/setup.sql /docker-entrypoint-initdb.d/
ADD user_data/ft_client/test_client/entrypoint.sh /entrypoint.sh
# Run entrypoint
WORKDIR /home/runner
ENTRYPOINT ["/entrypoint.sh"]