wshiper-api / Dockerfile
Yash Chauhan
[updated]
5f6fe2c
raw
history blame
557 Bytes
# Use an official Python image with CUDA support if using GPU
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
# Set working directory
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Copy the required files
COPY requirements.txt requirements.txt
COPY app.py app.py
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose port for FastAPI
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]