Violence_Detector / Dockerfile
muskan19's picture
Update Dockerfile
bad7f37 verified
raw
history blame contribute delete
940 Bytes
# Use a full Python base image for compatibility
FROM python:3.9
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/*
# βœ… Internet connectivity test to Hugging Face
RUN curl -I https://huggingface.co
# Copy all project files into the container
COPY . .
# Create .streamlit config directory and disable usage stats
RUN mkdir -p /app/.streamlit && \
echo "\
[server]\n\
headless = true\n\
enableCORS = false\n\
port = 8501\n\
\n\
[browser]\n\
gatherUsageStats = false\n\
" > /app/.streamlit/config.toml
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose Streamlit default port
EXPOSE 8501
# Start the Streamlit app
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]