TFM_DataScience_APP / Dockerfile.txt
ALVHB95's picture
new model
b48561b
raw
history blame
772 Bytes
#dockerfile.txt
FROM python:3.10
# Prevent Python from writing .pyc files / enable unbuffered logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Make Gradio listen on all interfaces and on port 7860
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
# Optional but recommended
# ENV HUGGINGFACEHUB_API_TOKEN=hf_xxx
# ENV USER_AGENT="green-greta/1.0 (+contact-or-repo)"
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . .
# Expose Gradio port
EXPOSE 7860
# Your code calls app.launch(...) inside app.py, so just run Python.
# (Uvicorn is for FastAPI apps, which you are not using here.)
CMD ["python", "app.py"]