Test-ticketing / Dockerfile
jonathanjordan21's picture
Update Dockerfile
6af6856 verified
Raw History Blame Contribute Delete
1.11 kB
# # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# # you will also find guides on how best to write your Dockerfile
# FROM python:latest
# RUN useradd -m -u 1000 user
# USER user
# ENV PATH="/home/user/.local/bin:$PATH"
# WORKDIR /app
# COPY --chown=user ./requirements.txt requirements.txt
# RUN pip install --no-cache-dir --upgrade -r requirements.txt
# COPY --chown=user . /app
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
# FROM python:3.11-slim
# WORKDIR /root
# COPY requirements.txt .
# RUN pip install --no-cache-dir -r requirements.txt
# COPY app ./app
# COPY artifacts ./artifacts
# ENV PYTHONUNBUFFERED=1
# ENV HF_HOME=/root/.cache/huggingface
# EXPOSE 8000
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
COPY artifacts ./artifacts
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV HF_HOME=/data/.huggingface
EXPOSE 7860
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]