Mila-Wellnest-Backend / Dockerfile
Estherrr777's picture
Update Dockerfile
333b86f verified
raw
history blame contribute delete
682 Bytes
FROM python:3.10-slim
# Set up user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Upgrade pip and install requirements
COPY --chown=user backend/requirements.txt ./requirements.txt
# Force clean, fixed installs
RUN pip install --upgrade pip && \
pip uninstall -y transformers peft || true && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir \
transformers==4.31.0 \
peft==0.5.0
# Copy project code
COPY --chown=user . .
# Expose FastAPI port
EXPOSE 7860
# Start app
CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]