turner_ml_2 / Dockerfile
aamirtaymoor's picture
Update Dockerfile
52f29e6 verified
FROM python:3.8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# ENV GUNICORN_CMD_ARGS "--bind=0.0.0.0:8000 --log-level=error"
WORKDIR /code
# RUN pip install gunicorn
# COPY gunicorn_conf.py /code
COPY ./hf_demo/requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.1/en_core_web_sm-3.4.1.tar.gz
RUN git clone https://github.com/facebookresearch/fastText.git && cd fastText && pip install .
COPY ./hf_demo .
RUN python manage.py migrate
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# CMD ["gunicorn", "hf_demo.wsgi:application
# CMD ["gunicorn", "--bind", "0.0.0.0:8000", "hf_demo.wsgi:application"]