Update Dockerfile
Browse files- Dockerfile +13 -4
Dockerfile
CHANGED
@@ -10,11 +10,20 @@ COPY . /app
|
|
10 |
# Install any dependencies specified in requirements.txt
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
-
# Set environment variables
|
14 |
ENV HF_HOME /tmp/huggingface
|
15 |
|
16 |
-
# Expose the port that Gunicorn will listen on
|
17 |
-
EXPOSE 7860
|
18 |
|
19 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "--timeout", "300", "app:app"]
|
|
|
10 |
# Install any dependencies specified in requirements.txt
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
|
|
13 |
ENV HF_HOME /tmp/huggingface
|
14 |
|
|
|
|
|
15 |
|
16 |
+
# Set the TRANSFORMERS_CACHE environment variable
|
17 |
+
#ENV TRANSFORMERS_CACHE /tmp/transformers_cache
|
18 |
+
|
19 |
+
# Create a directory for storing files if it doesn't exist
|
20 |
+
RUN mkdir -p riskclassification_finetuned_xlnet_model_ld
|
21 |
+
|
22 |
+
# Adjust permissions for the directory and its contents
|
23 |
+
RUN chmod -R 777 riskclassification_finetuned_xlnet_model_ld
|
24 |
+
|
25 |
+
# Expose the port that Flask runs on
|
26 |
+
EXPOSE 5000
|
27 |
+
|
28 |
+
# Define the command to run your Flask application
|
29 |
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "--timeout", "300", "app:app"]
|