Commit c9cab0e0 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #1211 from kmod/docker2

Create a simple Dockerfile
parents 61ac7b5c bf20355f
......@@ -668,10 +668,10 @@ CMAKE_SHAREDMODS := sharedmods ext_pyston
.PHONY: pyston_dbg pyston_release
pyston_dbg: $(CMAKE_SETUP_DBG)
$(NINJA) -C $(CMAKE_DIR_DBG) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
$(NINJA) -C $(CMAKE_DIR_DBG) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_DBG)/pyston $@
pyston_release: $(CMAKE_SETUP_RELEASE)
$(NINJA) -C $(CMAKE_DIR_RELEASE) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) ext_cpython $(NINJAFLAGS)
$(NINJA) -C $(CMAKE_DIR_RELEASE) pyston copy_stdlib copy_libpyston $(CMAKE_SHAREDMODS) $(NINJAFLAGS)
ln -sf $(CMAKE_DIR_RELEASE)/pyston $@
CMAKE_SETUP_GCC := $(CMAKE_DIR_GCC)/build.ninja
......@@ -1103,5 +1103,5 @@ clang_lint: $(foreach FN,$(MAIN_SRCS),$(dir $(FN))lint_$(notdir $(FN:.cpp=)))
package: pyston_pgo
$(NINJA) -C $(CMAKE_DIR_RELEASE_GCC_PGO) package
package_nonpgo:
package_nonpgo: pyston_release
$(NINJA) -C $(CMAKE_DIR_RELEASE) package
......@@ -10,6 +10,21 @@ Pyston should be considered in alpha: it "works" in that it can successfully run
Currently, Pyston targets Python 2.7, only runs on x86_64 platforms, and only has been tested on Ubuntu. Support for more platforms -- along with Python 3 compatibility -- is desired but deferred until we feel successful on our initial platform. Pyston does not currently work on Mac OSX, and it is not clear when it will.
### Getting Pyston
We have some experimental docker images available; try running
```
docker run --it pyston/pyston
```
to be dropped in to a container that runs a pre-activated pyston virtualenv. This means that the "pip" and "python" commands correspond to Pyston, so you can directly start doing `pip install numpy; python my_numpy_script.py` to get started. As mentioned though, the docker images are experimental, so please give us feedback [on gitter](https.://gitter.im/dropbox/pyston).
You can also download the latest release [from GitHub](https://github.com/dropbox/pyston/releases). It should for the most part just extract and run. One thing to note is that current virtualenv versions do not support Pyston, so you will need to use our version that we ship in the releases, such as by `pyston-0.5.0-linux64/pyston pyston-0.5.0-linux/pyston/virtualenv/virtualenv.py my_new_env`.
You can also build Pyston directly from source. We have some build instructions at [INSTALLING.md](https://github.com/dropbox/pyston/blob/master/docs/INSTALLING.md). If you have any issues, please feel free to file an issue in the issue tracker, or mention it via email or gitter.
##### Contributing
Pyston welcomes any kind of contribution; please see [CONTRIBUTING.md](https://github.com/dropbox/pyston/blob/master/CONTRIBUTING.md) for details.
......@@ -17,6 +32,9 @@ Pyston welcomes any kind of contribution; please see [CONTRIBUTING.md](https://g
We have some documentation for those interested in contributing: see our [Development Guide](https://github.com/dropbox/pyston/wiki/Development-Guide) and [development tips](docs/TIPS.md).
All pull requests are built and tested by travis-ci.org running Ubuntu 12.04.
See [travis-ci.org/dropbox/pyston/builds](https://travis-ci.org/dropbox/pyston/builds).
### Roadmap
##### v0.5: Coming soon
......@@ -57,20 +75,6 @@ We have some documentation for those interested in contributing: see our [Develo
- Focus was on building and validating the core Python-to-LLVM JIT infrastructure.
- Many core parts of the language were missing.
### Trying it out
We have some build instructions at [INSTALLING.md](https://github.com/dropbox/pyston/blob/master/docs/INSTALLING.md). If you have any issues, please feel free to file an issue in the issue tracker, or mention it via email or gitter.
Once you've followed those instructions, you should be able to do
```
$ make check
```
And see that hopefully all of the tests pass. (If they don't, please let us know.)
All pull requests are built and tested by travis-ci.org running Ubuntu 12.04.
See [travis-ci.org/dropbox/pyston/builds](https://travis-ci.org/dropbox/pyston/builds).
### Running Pyston
Pyston builds in a few different configurations; right now there is `pyston_dbg`, which is the debug configuration and contains assertions and debug symbols, and `pyston_release`, the release configuration which has no assertions or debug symbols, and has full optimizations. You can build them by saying `make pyston_dbg` or `make pyston_release`, respectively. If you are interested in seeing how fast Pyston can go, you should try the release configuration, but there is a good chance that it will crash, in which case you can run the debug configuration to see what is happening.
......
# Adapted from CPython's Dockerfile:
FROM buildpack-deps:jessie
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
ENV PYSTON_TAG v0.4
ENV PYSTON_VERSION 0.4.0
RUN set -x \
&& curl -SL "https://github.com/dropbox/pyston/releases/download/${PYSTON_TAG}/pyston-${PYSTON_VERSION}-linux64.tar.gz" | tar -xzC /
RUN /pyston-${PYSTON_VERSION}-linux64/pyston /pyston-${PYSTON_VERSION}-linux64/virtualenv/virtualenv.py /pyston_env
ENV PATH /pyston_env/bin/:$PATH
RUN pip install https://github.com/dropbox/pyston/releases/download/${PYSTON_TAG}/Cython-0.22-pyston.tar.gz
RUN echo "source /pyston_env/bin/activate" >> /root/.bashrc
CMD ["/bin/bash"];
To produce a new docker build:
```
cd ~/pyston/docker
BUILD_NAME=0.5.0
docker build -t pyston/pyston:latest -t pyston/pyston:${BUILD_NAME} .
docker push pyston/pyston:latest
docker push pyston/pyston:${BUILD_NAME}
```
Then using docker is just a matter of `docker run -it pyston/pyston` and running python/pip etc.
Still todo: use PR #1099 to do in-tree builds, rather than just downloading our release?
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment