- clone arrow git repo locally (under a macOS in my case)
- open
arrow/python
folder withvscode
- create a
Dockerfile
for pyarrow development. pyarrow provides such Dockerfile, so you only need to do some linkingln -s examples/minimal_build/Dockerfile.ubuntu Dockerfile
- Follow the steps here to open a remote container as dev env in vscode
- Run "Remote-Containers: Open Folder in Container..." in
vscode
- Choose
Dockerfile
you just linked vscode
will build the container and open it later, just wait
- Run "Remote-Containers: Open Folder in Container..." in
- Enter the container for building pyarrow
docker exec -it <container_id> bash
vscode
syncs all files under/workspaces
folder, changeWORKDIR
env variable to/workspaces
export WORKDIR=/workspaces && export ARROW_ROOT=$WORKDIR/arrow
- (optional) Edit build script to use the synced folder
- Edit
/workspaces/arrow/python/examples/minimal_build/build_venv.sh
ARROW_ROOT=${ARROW_ROOT:-/arrow}
- Edit
- Build with the build script
./build_venv.sh
- If you want to edit pyarrow files without re-building cpp files
export WORKDIR=/workspaces export LIBRARY_INSTALL_DIR=$WORKDIR/local-libs export CPP_BUILD_DIR=$WORKDIR/arrow-cpp-build export ARROW_HOME=$WORKDIR/dist export ARROW_ROOT=$WORKDIR/arrow export LD_LIBRARY_PATH=$ARROW_HOME/lib:$LD_LIBRARY_PATH export PYARROW_BUILD_TYPE=Debug export PYARROW_CMAKE_GENERATOR=Ninja export PYARROW_WITH_PARQUET=1 export PYARROW_WITH_FLIGHT=1 # if arrow flight is needed export ARROW_TEST_DATA="$ARROW_ROOT/testing/data" export PARQUET_TEST_DATA="$ARROW_ROOT/cpp/submodules/parquet-testing/data" pip install -r $ARROW_ROOT/python/requirements-build.txt
- run the pyarrow build
pushd arrow/python python setup.py develop
- run pyarrow test
pip install -r $ARROW_ROOT/python/requirements-test.txt py.test pyarrow
Last active
September 13, 2022 09:48
-
-
Save niyue/aeb0fb2378ffa8580e47c7d5bd44b6d4 to your computer and use it in GitHub Desktop.
develop pyarrow with visual studio code remote containers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment