Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11.6
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY requirements.txt ./requirements.txt
|
| 4 |
+
RUN pip install -r requirements.txt
|
| 5 |
+
RUN pip install streamlit==1.24.0
|
| 6 |
+
|
| 7 |
+
USER root
|
| 8 |
+
RUN chmod -R 777 /app
|
| 9 |
+
RUN chown -R root:root /app
|
| 10 |
+
|
| 11 |
+
ENV STREAMLIT_SERVER_ENABLECORS=false
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
RUN mkdir -p /tmp/cache/
|
| 15 |
+
RUN chmod a+rwx -R /tmp/cache/
|
| 16 |
+
RUN mkdir /uploads && chmod -R 777 /uploads
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
ENV TRANSFORMERS_CACHE=/tmp/cache/
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
COPY . /app
|
| 22 |
+
ENTRYPOINT ["streamlit", "run"]
|
| 23 |
+
CMD ["app.py", "--server.port", "7860"]
|