Spaces:
Running
Running
Gaurav vashistha
commited on
Commit
·
feaab26
1
Parent(s):
14c0113
Add Dockerfile for Hugging Face deployment
Browse files- Dockerfile +10 -0
Dockerfile
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
+
WORKDIR /code
|
| 3 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 4 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 5 |
+
COPY . /code
|
| 6 |
+
# Fix permissions for libraries that write to home
|
| 7 |
+
RUN mkdir -p /tmp/home
|
| 8 |
+
ENV HOME=/tmp/home
|
| 9 |
+
# Start the FastAPI server on port 7860 (required by Hugging Face)
|
| 10 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|