File size: 569 Bytes
f7ce9d3
 
 
 
 
a28228d
 
 
f7ce9d3
 
 
4f68dd1
 
f7ce9d3
feeb798
 
 
 
f7ce9d3
4f68dd1
 
 
 
 
9bb706c
 
 
 
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
# 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 /app

ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app
# Copy app code
COPY . .


COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt


# Make the entire /app directory fully writeable for all users
RUN chmod -R 777 /app

# Ensure the app runs as the same user as the Space UI
RUN useradd -m -u 1000 user
USER user


CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]