citeas / Dockerfile
raannakasturi's picture
Update Dockerfile
8df5725 verified
raw
history blame contribute delete
717 Bytes
FROM python:3.8-slim-buster
# Install git
RUN apt-get update && \
apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Clone CiteAs repo
RUN git clone https://github.com/ourresearch/citeas-api.git .
# Install dependencies
RUN pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install "flask<2.3" "werkzeug<2.1"
# Create writable cache directory
RUN mkdir -p /app/cache
# Set environment variable so requests_cache stores cache in writable directory
ENV REQUESTS_CACHE_NAME=/app/cache/citeas_cache
# Expose port
EXPOSE 7860
# Start the app
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "views:app", "-w", "3"]