Edutube / Dockerfile
zhixiusue's picture
Update Dockerfile
285a9e6 verified
raw
history blame contribute delete
478 Bytes
FROM python:3.9
# Create a user to avoid running as root
RUN useradd -m -u 1000 user
USER user
# Add Python bin path to environment
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy files
COPY --chown=user . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Run Streamlit app on Hugging Face-required port (7860)
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]