OK, so I retrained my model on Floydhub, and attempted to deploy the app. Here’s my repo, including the model.pkl file. These were the model packages from Floydhub’s pip list
:
fastai==1.0.61
torch==1.5.0
torchvision==0.6.1
So this is the list for my requirements.txt
file:
aiofiles==0.4.0
aiohttp==3.5.4
asyncio==3.4.3
fastai==1.0.61
numpy==1.18.4
pillow==5.4.1
python-multipart==0.0.5
starlette==0.12.0
uvicorn==0.11.5
torch==1.5.0
torchvision==0.6.1
I’ve tried testing the app locally, but using ‘python app/server.py serve’ I get this error:
Traceback (most recent call last):
File "app/server.py", line 48, in <module>
learn = loop.run_until_complete(asyncio.gather(*tasks))[0]
File "C:\Users\[me]\anaconda3\lib\asyncio\base_events.py", line 583, in run_until_complete
return future.result()
File "app/server.py", line 33, in setup_learner
await download_file(export_file_url, path / export_file_name)
File "app/server.py", line 26, in download_file
async with session.get(url) as response:
File "C:\Users\[me]\anaconda3\lib\site-packages\aiohttp\client.py", line 1005, in __aenter__
self._resp = await self._coro
File "C:\Users\[me]\anaconda3\lib\site-packages\aiohttp\client.py", line 466, in _request
ssl=ssl, proxy_headers=proxy_headers, traces=traces)
File "C:\Users\[me]\anaconda3\lib\site-packages\aiohttp\client_reqrep.py", line 286, in __init__
self.update_host(url)
File "C:\Users\[me]\anaconda3\lib\site-packages\aiohttp\client_reqrep.py", line 340, in update_host
raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL
(base)
I’ve managed to install Docker through pip install docker
but when I run the docker line from the app readme, my environment doesn’t seem to recognize docker. I don’t know if it’s because I need to change the command to be able to run through conda
or not.
I probably just don’t know enough about web dev to deploy this without going back and learning enough Django/React/some other framework to build it from scratch.