Spaces:
Sleeping
Sleeping
Initial WorkWise backend GPU
Browse files- Dockerfile +4 -3
- app/main.py +2 -0
Dockerfile
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
-
COPY . /app
|
| 5 |
-
#COPY app/ ./app/
|
| 6 |
-
#COPY data/ ./data/
|
| 7 |
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
+
COPY . /app
|
| 9 |
+
#COPY app/ ./app/
|
| 10 |
+
#COPY data/ ./data/
|
| 11 |
+
|
| 12 |
EXPOSE 7860
|
| 13 |
|
| 14 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app/main.py
CHANGED
|
@@ -57,6 +57,7 @@ async def health_check():
|
|
| 57 |
return {"status": "error", "message": str(e)}
|
| 58 |
|
| 59 |
# This is needed only when this was a Docker Space. Remove for Gradio
|
|
|
|
| 60 |
if __name__ == "__main__":
|
| 61 |
import uvicorn
|
| 62 |
uvicorn.run(
|
|
@@ -66,3 +67,4 @@ if __name__ == "__main__":
|
|
| 66 |
reload=True,
|
| 67 |
log_level=settings.LOG_LEVEL
|
| 68 |
)
|
|
|
|
|
|
| 57 |
return {"status": "error", "message": str(e)}
|
| 58 |
|
| 59 |
# This is needed only when this was a Docker Space. Remove for Gradio
|
| 60 |
+
'''
|
| 61 |
if __name__ == "__main__":
|
| 62 |
import uvicorn
|
| 63 |
uvicorn.run(
|
|
|
|
| 67 |
reload=True,
|
| 68 |
log_level=settings.LOG_LEVEL
|
| 69 |
)
|
| 70 |
+
'''
|