chore: add torch as a proper requirement for the package

- we forgot to do that and it seems poetry chose versions of torch for all
OSes so should be good
- removed torchvision as we apparently never really used it
- make it work on linux and macOS
This commit is contained in:
Arthur Meyre
2021-12-15 11:51:50 +01:00
parent 5e62cfcc42
commit 760a0af39b
9 changed files with 135 additions and 49 deletions

View File

@@ -20,7 +20,6 @@ RUN mkdir /pkg && mkdir /app
WORKDIR /pkg
COPY --from=builder /build/dist/*.whl .
COPY docker/release_resources/release_requirements.txt .
COPY torch_requirements.txt .
RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
apt-get install --no-install-recommends -y \
@@ -32,8 +31,6 @@ RUN apt-get update && apt-get upgrade --no-install-recommends -y && \
python3 -m pip install --no-cache-dir --upgrade pip wheel setuptools && \
echo "export MPLBACKEND=TkAgg" >> /root/.bashrc && \
python3 -m pip install --no-cache-dir ./*.whl && \
python3 -m pip install --no-cache-dir -r torch_requirements.txt \
-f https://download.pytorch.org/whl/torch_stable.html && \
python3 -m pip install --no-cache-dir -r release_requirements.txt
ENV LD_PRELOAD=${RT_LIB}:${LD_PRELOAD}

View File

@@ -6,7 +6,6 @@
!pyproject.toml
!docker/release_resources/entry_point.sh
!docker/release_resources/release_requirements.txt
!torch_requirements.txt
# But still ignore pycache
**/__pycache__