File size: 772 Bytes
b48561b
 
dfc8ff7
 
3a7b6f0
 
 
 
 
 
 
 
 
 
 
 
dfc8ff7
86ca002
dfc8ff7
3a7b6f0
 
dfc8ff7
 
 
3a7b6f0
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#dockerfile.txt

FROM python:3.10

# Prevent Python from writing .pyc files / enable unbuffered logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Make Gradio listen on all interfaces and on port 7860
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860

# Optional but recommended
# ENV HUGGINGFACEHUB_API_TOKEN=hf_xxx
# ENV USER_AGENT="green-greta/1.0 (+contact-or-repo)"

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY . .

# Expose Gradio port
EXPOSE 7860

# Your code calls app.launch(...) inside app.py, so just run Python.
# (Uvicorn is for FastAPI apps, which you are not using here.)
CMD ["python", "app.py"]