-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.old
More file actions
executable file
·55 lines (44 loc) · 1.85 KB
/
Dockerfile.old
File metadata and controls
executable file
·55 lines (44 loc) · 1.85 KB
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
FROM xdbc-client:latest
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
make \
cmake \
protobuf-compiler \
g++ \
libboost-all-dev \
libpq-dev \
wget \
gdb \
odbc-postgresql \
plocate \
nano
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh --no-check-certificate \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
&& conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
RUN conda --version
RUN conda update -n base -c defaults conda
RUN conda create --name python39 python==3.9 -y
RUN conda install -n base -c conda-forge mamba -y && \
mamba install -n python39 -c conda-forge numpy pybind11 xtensor-python xtensor pandas psycopg2 sqlalchemy connectorx==0.3.3 turbodbc pyarrow python-duckdb modin-ray==0.30.1 -y
ENV CONDA_DEFAULT_ENV=python39
ENV CONDA_PREFIX=/root/miniconda3/envs/python39
ENV PATH="$CONDA_PREFIX/bin:$PATH"
RUN echo "source activate python39" > ~/.bashrc
RUN pip install pyarrow==18.1.0
RUN conda install ray-core==2.1.0 -c conda-forge -y
#update postgres odbc driver location
RUN full_path=$(locate psqlodbca.so | head -n 1) && \
sed -i "s|Driver=psqlodbca.so|Driver=$full_path|g" /etc/odbcinst.ini
COPY python/ /workspace/python
COPY tests/ /workspace/tests
COPY CMakeLists.txt /workspace
RUN cd /workspace && mkdir -p build && cd build && rm -rf * && \
cmake .. -DCMAKE_BUILD_TYPE=Release && make && cp pyxdbc.cpython-39-x86_64-linux-gnu.so ../tests/ && cp pyxdbcparquet.cpython-39-x86_64-linux-gnu.so ../tests/
WORKDIR /workspace