You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM python:3.10-slim
RUN apt-get update
RUN apt-get -y full-upgrade
RUN apt-get install -y --no-install-recommends \
libcairo2 libdouble-conversion3 libxml2 lib3mf1 libzip4 libharfbuzz0b \
libboost-thread1.74.0 libboost-program-options1.74.0 libboost-filesystem1.74.0 \
libboost-regex1.74.0 libmpfr6 libqscintilla2-qt5-15 \
libqt5multimedia5 libqt5concurrent5 libtbb12 libglu1-mesa \
libglew2.2 xvfb xauth
RUN apt-get clean
WORKDIR /usr/src/app
RUN mkdir /tmp/gradio
RUN pip install --no-cache-dir gradio
COPY . .
RUN pip install -r requirements.txt
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_TEMP_DIR="/tmp/gradio"
CMD ["python", "app.py"]
Run it (docker build -t gradio-app . && docker run -p 7860:7860 gradio-app) and try to upload the file
Screenshot
No response
Logs
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 532, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1938, in process_api
data = await self.postprocess_data(block_fn, result["prediction"], state)
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1761, in postprocess_data
prediction_value = block.postprocess(prediction_value)
File "/usr/local/lib/python3.10/site-packages/gradio/components/file.py", line 193, in postprocess
size=Path(value).stat().st_size,
File "/usr/local/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp52s9_i2i/tmpq0guqj89'
### System Info
```shell
MacOS 14.5, MacBook Pro M1 2020.
Env inside Docker container:
Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.36.1
gradio_client version: 1.0.1
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
altair: 5.3.0
fastapi: 0.111.0
ffmpy: 0.3.2
gradio-client==1.0.1 is not installed.
httpx: 0.27.0
huggingface-hub: 0.23.4
importlib-resources: 6.4.0
jinja2: 3.1.4
markupsafe: 2.1.5
matplotlib: 3.9.0
numpy: 2.0.0
orjson: 3.10.5
packaging: 23.2
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.7.4
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.4.10
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.12.3
typing-extensions: 4.12.2
urllib3: 2.2.2
uvicorn: 0.30.1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.6.0
httpx: 0.27.0
huggingface-hub: 0.23.4
packaging: 23.2
typing-extensions: 4.12.2
websockets: 11.0.3
### Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered:
Describe the bug
Can not find the uploaded file while Gradio is in Docker container.
While I run it without docker (just
python3 gradio.py
), it is working OK.Have you searched existing issues? 🔎
Reproduction
app.py
andDockerfile
with the following code:docker build -t gradio-app . && docker run -p 7860:7860 gradio-app
) and try to upload the fileScreenshot
No response
Logs
The text was updated successfully, but these errors were encountered: