VAEbackend / Dockerfile
kiran kumar
Initial Dockerized Flask VAE backend
c700583
raw
history blame contribute delete
647 Bytes
# Use official PyTorch image with CUDA 11.8 and cuDNN 9
FROM pytorch/pytorch:2.7.1-cuda11.8-cudnn9-runtime
# Set working directory inside the container
WORKDIR /app
# Copy requirements.txt first (for layer caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --progress-bar=on -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose the port your Flask app will run on
EXPOSE 7860
# Set environment variables to avoid Python buffering and enable CUDA
ENV PYTHONUNBUFFERED=1
ENV CUDA_VISIBLE_DEVICES=0
# Start the Flask server
CMD ["gunicorn", "-b", "0.0.0.0:7860", "server:app"]