-
Notifications
You must be signed in to change notification settings - Fork 0
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
9c59b6d
commit 7f7357d
Showing
1 changed file
with
22 additions
and
20 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,27 +1,29 @@ | ||
FROM ubuntu:18.04 | ||
RUN yes | apt-get update | ||
RUN yes | apt-get upgrade | ||
RUN mkdir /app | ||
# Use a newer base image (Ubuntu 20.04) and reduce the number of RUN commands. | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales | ||
# Update the package index and install system dependencies. | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
locales \ | ||
python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
build-essential \ | ||
cron | ||
|
||
# Configure locales for UTF-8 support. | ||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG=en_US.UTF-8 | ||
|
||
# Set the environment variable for UTF-8 locale. | ||
ENV LANG en_US.UTF-8 | ||
RUN yes | apt-get install python3 | ||
RUN yes | apt-get install python3-pip | ||
RUN yes | apt-get install cron | ||
RUN pip3 install -U Flask | ||
RUN pip3 install -U nltk | ||
RUN pip3 install -U requests | ||
RUN pip3 install -U pandas | ||
RUN pip3 install -U gspread | ||
RUN pip3 install -U oauth2client | ||
RUN pip3 install -U datetime | ||
RUN pip3 install -U pymongo | ||
RUN pip3 install -U scikit-learn | ||
RUN pip3 install airtable-python-wrapper | ||
RUN python3 -mpip install matplotlib | ||
RUN pip3 install --upgrade gensim | ||
|
||
# Install Python packages including Flask and its dependencies. | ||
RUN pip3 install -U Flask MarkupSafe nltk requests pandas gspread oauth2client datetime pymongo scikit-learn airtable-python-wrapper matplotlib gensim | ||
|
||
# Create a directory for your application. | ||
RUN mkdir /app | ||
|
||
# Set the working directory to /app. | ||
WORKDIR /app |