File size: 829 Bytes
8c62c93
 
 
e6d905c
8c62c93
e6d905c
8c62c93
e6d905c
8c62c93
e6d905c
8c62c93
e6d905c
 
 
 
b6a8117
8bc3dc5
e6d905c
 
8c62c93
 
e6d905c
 
 
6bcad7c
 
 
e6d905c
88a452b
e6d905c
 
b5eb12e
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
32
33
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile

# FROM python:3.9

# WORKDIR /code

# COPY ./requirements.txt /code/requirements.txt

# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# COPY . .

# CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
# Use the official Python 3.10.9 image
FROM python:3.10.12


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

# Set the working directory to /
WORKDIR /

RUN mkdir -p /uploads
RUN chmod 777 /uploads

# Install requirements.txt 
RUN pip install --no-cache-dir --upgrade -r /requirements.txt

# Start the FastAPI app on port 7860, the default port expected by Spaces
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]