-
Notifications
You must be signed in to change notification settings - Fork 4
Development Environment with Docker
Galuh Sahid edited this page Feb 14, 2020
·
4 revisions
- Make sure you have Docker installed
- Fork https://github.com/pandas-dev/pandas and clone the repo to your local
- Change line https://github.com/pandas-dev/pandas/blob/master/Dockerfile#L5 to your own GitHub username
- In the root directory of the pandas repository, build the Docker image by running:
docker build .
- Check the image id by running
docker images
, here's my output:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 79a453eca56e 31 minutes ago 4.43GB
My image id is 79a453eca56e
- Run the Docker image by running:
docker run --rm -ti -v <PATH TO PANDAS IN YOUR LOCAL>:/home/pandas <IMAGE ID> bash
Here's mine for example:
docker run --rm -ti -v $HOME/Documents/personal/pandas:/home/pandas 79a453eca56e bash
- Now you're inside the container. You dont need to install anything else because Docker has done everything for you. Now go to the pandas directory. In the container, the pandas directory is in
home/pandas
, so run:
cd home/pandas
- Verify that your git upstream is to the repo in pandas-dev, and origin is in your own repo, by running:
git remote -v
It's supposed to be like this:
origin https://github.com/galuhsahid/pandas.git (fetch)
origin https://github.com/galuhsahid/pandas.git (push)
upstream https://github.com/pandas-dev/pandas.git (fetch)
upstream https://github.com/pandas-dev/pandas.git (push)
- Now you can switch to your feature branch and make your changes there. If you're done with your changes you can commit and push as usual.
Note
If you're trying to run validate_docstring.py
and it fails, try to run:
python setup.py build_ext --inplace --force