File size: 486 Bytes
c701f6f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.9

# Set the working directory
WORKDIR /code

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

# Copy all your files (server.py, database.json)
COPY . /code

# Create a writable directory for the database (Hugging Face specific)
RUN chmod 777 /code

# Start the server on port 7860 (Hugging Face standard)
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]