Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Dec 28, 2024
1 parent 6c47b7c commit 8557866
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docker/Dockerfile
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"]

0 comments on commit 8557866

Please # to comment.