@@ -23,27 +23,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
23
23
build-essential \
24
24
&& rm -rf /var/lib/apt/lists/*
25
25
26
+ WORKDIR /reward_preprocessing
27
+
26
28
ENV PATH="/venv/bin:$PATH"
29
+ COPY ./requirements.txt /reward_preprocessing/
30
+ COPY ./requirements-dev.txt /reward_preprocessing/
27
31
COPY ci/build_and_activate_venv.sh ./ci/build_and_activate_venv.sh
28
32
RUN ci/build_and_activate_venv.sh /venv
29
33
30
- RUN curl -sSL https://install.python-poetry.org | python -
31
- ENV PATH="/root/.local/bin:$PATH"
32
-
33
-
34
- WORKDIR /reward_preprocessing
35
- # Copy only necessary dependencies to build virtual environment.
36
- # This minimizes how often this layer needs to be rebuilt.
37
- COPY poetry.lock pyproject.toml ./
38
- # Ideally, we'd clear the poetry cache but this seems annoyingly
39
- # difficult and not worth getting right for this project
40
- # (I've tried some things from https://github.com/python-poetry/poetry/issues/521
41
- # without success)
42
- RUN poetry install --no-interaction --no-ansi
43
-
44
- # clear the directory again (this is necessary so that CircleCI can checkout
45
- # into the directory)
46
- RUN rm poetry.lock pyproject.toml
47
34
48
35
# full stage contains everything.
49
36
# Can be used for deployment and local testing.
@@ -55,7 +42,10 @@ COPY . /reward_preprocessing
55
42
# Note that all dependencies were already installed in the previous stage.
56
43
# The purpose of this is only to make the local code available as a package for
57
44
# easier import.
58
- RUN poetry run python setup.py sdist bdist_wheel
59
- RUN poetry run pip install dist/reward_preprocessing-*.whl
45
+ RUN python setup.py sdist bdist_wheel
46
+ RUN pip install dist/reward_preprocessing-*.whl
47
+
48
+ # Move into src directory, so scripts can be run from outside the docker container.
49
+ CMD cd src/
60
50
61
- CMD ["poetry" , "run" , " pytest" ]
51
+ CMD ["pytest" ]
0 commit comments