File size: 664 Bytes
34c29ac
 
 
 
93c6e79
 
 
 
16545d3
93c6e79
8b078b7
 
 
93c6e79
c497ddc
34c29ac
93c6e79
c497ddc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.9

WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

RUN pip install --no-cache-dir -r requirements.txt
RUN apt-get update && apt-get install -y libgl1-mesa-glx

# Command to modify the file before app startup
RUN sed -i 's/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/' /usr/local/lib/python3.9/site-packages/basicsr/data/degradations.py

# Make port 80 available to the world outside this container
EXPOSE 7860

# Run app.py when the container launches
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]