NFL3.1 / Dockerfile
Airmanv's picture
Update Dockerfile
04a3407 verified
raw
history blame contribute delete
611 Bytes
FROM python:3.10
# Create the user
RUN useradd -m -u 1000 user
USER user
# Set environment variables so nfl_data_py knows where to write
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
XDG_CACHE_HOME=/home/user/.cache
WORKDIR $HOME/app
# Create the cache directory explicitly and give full permissions
RUN mkdir -p $HOME/.cache/nfl_data_py && chmod -R 777 $HOME/.cache
COPY --chown=user . $HOME/app
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
CMD ["streamlit", "run", "app.py", "--server.address", "0.0.0.0", "--server.port", "7860"]