Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Nov 17, 2021
1 parent 3852f96 commit ee5a238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,20 @@ RUN apk add --no-cache \
yq

COPY requirements.txt /opt/mautrix-telegram/requirements.txt
COPY optional-requirements.txt /opt/mautrix-telegram/optional-requirements.txt
WORKDIR /opt/mautrix-telegram
RUN apk add --virtual .build-deps \
python3-dev \
libffi-dev \
build-base \
&& sed -Ei 's/psycopg2-binary.+//' optional-requirements.txt \
# TODO: unpin Pillow here after it's updated in Alpine
&& pip3 install -r requirements.txt -r optional-requirements.txt 'pillow==8.2' \
&& apk del .build-deps
&& pip3 install -r requirements.txt 'pillow==8.2'

COPY . /opt/mautrix-telegram
RUN apk add git && pip3 install .[speedups,hq_thumbnails,metrics,e2be] \
&& pip3 install 'git+https://github.com/vector-im/[email protected]#egg=mautrix' \
&& apk del git \
&& cp mautrix_telegram/example-config.yaml . && rm -rf mautrix_telegram
&& cp mautrix_telegram/example-config.yaml . && rm -rf mautrix_telegram \
&& apk del .build-deps

VOLUME /data
ENV UID=1337 GID=1337 \
Expand Down
14 changes: 0 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
with open("requirements.txt") as reqs:
install_requires = reqs.read().splitlines()

with open("optional-requirements.txt") as reqs:
extras_require = {}
current = []
for line in reqs.read().splitlines():
if line.startswith("#/"):
extras_require[line[2:]] = current = []
elif not line or line.startswith("#"):
continue
else:
current.append(line)

extras_require["all"] = list({dep for deps in extras_require.values() for dep in deps})

try:
long_desc = open("README.md").read()
except IOError:
Expand Down Expand Up @@ -48,7 +35,6 @@
packages=setuptools.find_packages(),

install_requires=install_requires + ['psycopg2', 'uvloop'],
extras_require=extras_require,
python_requires="~=3.7",

setup_requires=["pytest-runner"],
Expand Down

0 comments on commit ee5a238

Please sign in to comment.