Spaces:
Paused

mixtral_convox / Dockerfile
dtel
updated port
311a709
Raw History Blame Contribute Delete
1.32 kB
# FROM python:3.9-slim
# # Install Git and other dependencies
# RUN apt-get update && apt-get install -y git wget tar && rm -rf /var/lib/apt/lists/*
# # Switch to root user before setting Git config
# USER root
# # Set Git configuration globally (use --system to avoid permission issues)
# RUN git config --system user.name "deepijatel" && \
# git config --system user.email "deepijatel@users.noreply.huggingface.co"
# # Set up working directory
# WORKDIR /app
# # Copy your application code
# COPY . .
# # Install Python dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Expose the FastAPI port
# EXPOSE 8000
# # Run the application
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
FROM python:3.9
# The two following lines are requirements for the Dev Mode to be functional
# Learn more about the Dev Mode at https://huggingface.co/dev-mode-explorers
RUN useradd -m -u 1000 deepijatel
WORKDIR /app
COPY --chown=deepijatel ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=deepijatel . /app
USER deepijatel
ARG HUGGINGFACE_TOKEN
ENV HUGGINGFACE_TOKEN=$HUGGINGFACE_TOKEN
ENV HOME=/home/deepijatel \
PATH=/home/deepijatel/.local/bin:$PATH
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]