Skip to content

Commit

Permalink
Change dockerfile for NLTK Data pre download #238
Browse files Browse the repository at this point in the history
  • Loading branch information
ckertam committed Dec 9, 2023
1 parent a8c39fd commit 4c755b7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ WORKDIR /backend

COPY requirements.txt .

RUN : \
&& apt-get update -y \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --no-install-recommends \
# Install system dependencies for NLTK and GDAL
RUN apt-get update -y && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y --no-install-recommends \
binutils libproj-dev gdal-bin \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& python -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& :
gcc g++ && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* && \
python -m pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
python -m nltk.downloader punkt averaged_perceptron_tagger wordnet stopwords

COPY manage.py .

Expand All @@ -28,6 +29,4 @@ COPY user/ ./user

EXPOSE 8000



CMD python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000

0 comments on commit 4c755b7

Please # to comment.