Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 14fed05

Browse files
committed
Add Manylinux Dockerfile
1 parent 6444438 commit 14fed05

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

Dockerfile.manylinux

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/usr/bin/env python3
2+
# Copyright 2004-present Facebook. All Rights Reserved.
3+
4+
FROM quay.io/pypa/manylinux2014_x86_64
5+
6+
# Install Python, Java, wget, vim
7+
RUN yum group install -y "Development Tools"
8+
RUN yum install -y python2 python36 python36-devel wget java-1.8.0-openjdk \
9+
java-1.8.0-openjdk-devel vim
10+
11+
# Install Ant
12+
WORKDIR "/tmp"
13+
RUN wget https://downloads.apache.org/ant/binaries/apache-ant-1.10.11-bin.zip
14+
RUN unzip apache-ant-1.10.11-bin.zip \
15+
&& mv apache-ant-1.10.11/ /opt/ant \
16+
&& ln -s /opt/ant/bin/ant /usr/bin/ant
17+
18+
# Download Buck
19+
WORKDIR "/opt"
20+
RUN git clone https://github.com/facebook/buck.git
21+
22+
# Set JAVA_HOME
23+
ENV JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"
24+
25+
# Build Buck
26+
WORKDIR "/opt/buck"
27+
RUN ant
28+
Run ln -s /opt/buck/bin/buck /usr/bin/buck
29+
30+
# Install Watchman
31+
WORKDIR "/opt/watchman"
32+
RUN wget https://github.com/facebook/watchman/releases/download/v2020.09.21.00/watchman-v2020.09.21.00-linux.zip
33+
RUN unzip watchman-v2020.09.21.00-linux.zip
34+
WORKDIR "/opt/watchman/watchman-v2020.09.21.00-linux"
35+
RUN mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
36+
RUN cp bin/* /usr/local/bin
37+
RUN cp lib/* /usr/local/lib
38+
RUN chmod 755 /usr/local/bin/watchman
39+
RUN chmod 2777 /usr/local/var/run/watchman
40+
41+
# Copy LabGraph files
42+
WORKDIR "/opt/labgraph"
43+
COPY . .
44+
45+
# Install LabGraph
46+
RUN python3.6 setup.py install --user
47+
48+
# Build LabGraph Wheel
49+
RUN python3.6 setup.py sdist bdist_wheel
50+
RUN python3.6 -m pip install auditwheel
51+
RUN auditwheel repair dist/*whl -w dist/
52+
53+
# Test LabGraph
54+
RUN python3.6 -m pytest --pyargs -v labgraph._cthulhu
55+
RUN python3.6 -m pytest --pyargs -v labgraph.events
56+
RUN python3.6 -m pytest --pyargs -v labgraph.graphs
57+
RUN python3.6 -m pytest --pyargs -v labgraph.loggers
58+
RUN python3.6 -m pytest --pyargs -v labgraph.messages
59+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_process_manager
60+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_aligner
61+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_cpp
62+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_exception
63+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_launch
64+
RUN python3.6 -m pytest --pyargs -v labgraph.runners.tests.test_runner
65+
RUN python3.6 -m pytest --pyargs -v labgraph.zmq_node

buck_ext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"Windows": "win.buckconfig",
1515
}.get(platform.system(), "unix.buckconfig")
1616

17+
if platform.system() == 'Linux' and platform.linux_distribution()[0] == 'CentOS Linux':
18+
CONFIG_FILE = "manylinux.buckconfig"
1719

1820
class BuckExtension(Extension):
1921
def __init__(self, name: str, target: str) -> None:

manylinux.buckconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[cxx]
2+
cxxppflags = -Wall -std=c++17
3+
cxxpp = /opt/rh/devtoolset-9/root/usr/bin/g++
4+
cxx = /opt/rh/devtoolset-9/root/usr/bin/g++
5+
ld = /opt/rh/devtoolset-9/root/usr/bin/g++

0 commit comments

Comments
 (0)