trying to fix 500
Browse files- Dockerfile +4 -4
- requirements.txt +1 -0
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Base image with Python and necessary tools
|
2 |
-
FROM python:3.12
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
@@ -11,8 +11,8 @@ COPY . /app
|
|
11 |
# Install Python dependencies
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
# Command to run the application
|
18 |
-
CMD ["gunicorn", "
|
|
|
1 |
# Base image with Python and necessary tools
|
2 |
+
FROM python:3.12-slim
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
|
|
11 |
# Install Python dependencies
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
+
ENV TRANSFORMERS_CACHE=/tmp
|
15 |
+
ENV PORT=7860
|
16 |
|
17 |
# Command to run the application
|
18 |
+
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2"]
|
requirements.txt
CHANGED
@@ -5,3 +5,4 @@ transformers==4.39.1
|
|
5 |
tensorflow
|
6 |
tf-keras
|
7 |
gunicorn
|
|
|
|
5 |
tensorflow
|
6 |
tf-keras
|
7 |
gunicorn
|
8 |
+
huggingface-hub
|