gtech13's picture
Update Dockerfile
681730a verified
Raw History Blame
766 Bytes
FROM python:3.10
# 1. HARDCODE THE INSTALLATION (Bypasses requirements.txt completely)
RUN pip install --no-cache-dir streamlit pandas bertopic sentence-transformers scikit-learn umap-learn hdbscan gensim matplotlib seaborn
# 2. Create the Hugging Face restricted user
RUN useradd -m -u 1000 user
USER user
# 3. Set the environment variables safely
ENV HOME=/home/user
ENV PATH=/usr/local/bin:/home/user/.local/bin:$PATH
# 4. Set the working directory
WORKDIR $HOME/app
# 5. Copy your python code and images into the container
COPY --chown=user:user . $HOME/app
# 6. Launch explicitly through Python to bypass the Linux PATH entirely
CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port", "7860", "--server.address", "0.0.0.0"]