diff --git a/backend/Dockerfile b/backend/Dockerfile index bbb5b568..77094093 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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 . @@ -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