-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c47b7c
commit 8557866
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
ARG BASE_IMAGE=ubuntu:18.04 | ||
ARG BASE_IMAGE=python:3.9-slim | ||
FROM $BASE_IMAGE | ||
LABEL maintainer="NeuML" | ||
LABEL repository="paperai" | ||
|
||
# Argument for ENTRYPOINT | ||
ARG START=/bin/bash | ||
ENV START=${START} | ||
# Set Python version (i.e. 3, 3.9) | ||
ARG PYTHON_VERSION=3 | ||
|
||
# Locale environment variables | ||
ENV LC_ALL=C.UTF-8 | ||
ENV LANG=C.UTF-8 | ||
|
||
# Install required packages | ||
RUN apt-get update && \ | ||
apt-get -y --no-install-recommends install libgomp1 gcc g++ python3.7 python3.7-dev python3-pip wget && \ | ||
apt-get -y --no-install-recommends install libgomp1 gcc g++ python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python3-pip wget && \ | ||
rm -rf /var/lib/apt/lists | ||
|
||
# Install paperai project and dependencies | ||
RUN ln -sf /usr/bin/python3.7 /usr/bin/python && \ | ||
RUN ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python && \ | ||
python -m pip install --no-cache-dir -U pip wheel setuptools && \ | ||
python -m pip install --no-cache-dir paperai | ||
|
||
# Cleanup build packages | ||
RUN apt-get -y purge gcc g++ python3-dev && apt-get -y autoremove | ||
RUN apt-get -y purge gcc g++ python${PYTHON_VERSION}-dev && apt-get -y autoremove | ||
|
||
# Create paperetl directories | ||
RUN mkdir -p paperetl/data paperetl/report | ||
|
||
# Start script | ||
ENTRYPOINT ${START} | ||
ENTRYPOINT ["/bin/bash"] |