Spaces:
Runtime error
Runtime error
File size: 717 Bytes
bfb77ee 9a3cec5 bfb77ee 9a3cec5 bfb77ee 9a3cec5 58c978b 9b07869 9a3cec5 58c978b 9a3cec5 bfb77ee 9a3cec5 58c978b 8df5725 9a3cec5 58c978b 8df5725 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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"]
|