Skip to content

Instantly share code, notes, and snippets.

@chrispruitt
Forked from dariodip/Dockerfile
Created February 5, 2021 01:22
Show Gist options
  • Select an option

  • Save chrispruitt/a41417a4fee0921d2be131332beaa5bf to your computer and use it in GitHub Desktop.

Select an option

Save chrispruitt/a41417a4fee0921d2be131332beaa5bf to your computer and use it in GitHub Desktop.

Revisions

  1. @dariodip dariodip created this gist Sep 21, 2017.
    10 changes: 10 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    FROM python:3.6

    WORKDIR /app
    ADD . /app
    RUN pip install -r requirements.txt

    RUN python setup.py build_ext --inplace

    ENTRYPOINT ["python"]
    CMD ["app.py"]
    3 changes: 3 additions & 0 deletions app.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    import hello

    hello.say_hello_to('Dario')
    3 changes: 3 additions & 0 deletions hello.pyx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@

    def say_hello_to(name):
    print("Hello %s!" % name)
    1 change: 1 addition & 0 deletions requirements.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Cython==0.26
    7 changes: 7 additions & 0 deletions setup.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    from distutils.core import setup
    from Cython.Build import cythonize

    setup(
    name= 'Hello world',
    ext_modules = cythonize("hello.pyx")
    )