Alzheimer_UI / Dockerfile
ak0601's picture
Update Dockerfile
7c05ef7 verified
raw
history blame contribute delete
608 Bytes
FROM python:3.9
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy and install requirements first for caching
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application
COPY --chown=user . /app
# Set the Flask app entry point for the 'flask run' command
ENV FLASK_APP=flask_app.py
# Run the Flask app on port 7860 (common for HF Spaces) and bind to all interfaces
CMD ["python", "-m", "flask", "run", "--host", "0.0.0.0", "--port", "7860"]