NoteGenie / Dockerfile
ziadmostafa's picture
Replace with updated NoteGenie version
0d48ff6
raw
history blame contribute delete
607 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create necessary directories
RUN mkdir -p flask_session
# Set permissions for flask_session directory and touch API key file
RUN chmod -R 777 flask_session && \
touch api_key.txt && \
chmod 666 api_key.txt
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
ENV PORT=7860
# Expose the port Hugging Face Spaces uses
EXPOSE 7860
# Command to run the application
CMD gunicorn --bind 0.0.0.0:7860 app:app