Skip to content

Commit

Permalink
cleanup [4/4]: Docker image
Browse files Browse the repository at this point in the history
ghstack-source-id: b3a94570c471d67c8fab794b9fcff3f5d7895325
Pull Request resolved: #30
  • Loading branch information
isidentical committed Oct 28, 2022
1 parent acd2c6e commit 8e806a3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# For building this image, you need to be in the project
# root and then pass -f tools/Dockerfile to docker build.
#
# $ docker build -f tools/Dockerfile -t isolate_server [--network=host]
#
# This is important since we want to be able to access src/ directory
# for copying the source code into the container (so the dockerfile
# will stay in a different directory than its context).
FROM python:3.9

RUN apt-get update && apt-get install -y git
RUN pip install --upgrade pip virtualenv wheel poetry-core

# Since system-level debian does not comply with
# the sysconfig, and we need to install a bunch
# of dependencies (like dbt-core), we are going to
# use a virtualenv.
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m virtualenv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

COPY tools/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

COPY . .
RUN pip install .

ENV ISOLATE_INHERIT_FROM_LOCAL=1

CMD ["python", "-m", "isolate.server.server"]
5 changes: 5 additions & 0 deletions tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
virtualenv>=20.4
importlib-metadata>=4.4
grpcio>=1.49
dill==0.3.5.1
protobuf

0 comments on commit 8e806a3

Please sign in to comment.