rajkhanke's picture
Create Dockerfile
f7a8089 verified
raw
history blame
1.6 kB
FROM python:3.9-slim
WORKDIR /app
# Create structure first
RUN mkdir -p /app/static/audio
RUN mkdir -p /app/templates
# Set permissions
RUN chmod -R 777 /app/static
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
espeak \
libespeak1 \
&& rm -rf /var/lib/apt/lists/*
# Copy files
COPY requirements.txt .
COPY app.py .
COPY final_price_data.csv .
COPY static /app/static/
COPY templates /app/templates/
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Make sure the port is exposed
EXPOSE 7860
# Set environment variable to tell Flask what to run
ENV FLASK_APP=app.py
# Using gunicorn as the WSGI server can be more reliable
CMD ["python", "-m", "flask", "run", "--host=0.0.0.0", "--port=7860"]FROM python:3.9-slim
WORKDIR /app
# Create structure first
RUN mkdir -p /app/static/audio
RUN mkdir -p /app/templates
# Set permissions
RUN chmod -R 777 /app/static
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
espeak \
libespeak1 \
&& rm -rf /var/lib/apt/lists/*
# Copy files
COPY requirements.txt .
COPY app.py .
COPY final_price_data.csv .
COPY static /app/static/
COPY templates /app/templates/
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Make sure the port is exposed
EXPOSE 7860
# Set environment variable to tell Flask what to run
ENV FLASK_APP=app.py
# Using gunicorn as the WSGI server can be more reliable
CMD ["python", "-m", "flask", "run", "--host=0.0.0.0", "--port=7860"]